generated from HappyPathway/template-dockerhub-container-workspace
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
51 lines (40 loc) · 1.36 KB
/
main.tf
File metadata and controls
51 lines (40 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
provider "aws" {
region = "us-east-1"
}
data "aws_caller_identity" "current" {}
resource "aws_ecrpublic_repository" "github-runner" {
repository_name = "github-runner"
catalog_data {
about_text = "Github Runner Image"
architectures = ["x86_64"]
description = "Github Runner Image"
logo_image_blob = filebase64("hpw.png")
operating_systems = ["Ubuntu"]
usage_text = "Creates a Github Runner Image"
}
tags = {
env = "production"
}
}
locals {
repository_uri = aws_ecrpublic_repository.github-runner.repository_uri
repository_id = aws_ecrpublic_repository.github-runner.id
aws_account_id = data.aws_caller_identity.current.account_id
region = "us-east-1"
arn = aws_ecrpublic_repository.github-runner.arn
}
output "repository_uri" {
value = issensitive(local.repository_id) ? nonsensitive(local.repository_uri) : local.repository_uri
}
output "reppsitory_id" {
value = issensitive(local.repository_id) ? nonsensitive(local.repository_id) : local.repository_id
}
output "aws_account_id" {
value = issensitive(local.aws_account_id) ? nonsensitive(local.aws_account_id) : local.aws_account_id
}
output "region" {
value = issensitive(local.region) ? nonsensitive(local.region) : local.region
}
output "arn" {
value = issensitive(local.arn) ? nonsensitive(local.arn) : local.arn
}