diff --git a/atlantis.yaml b/atlantis.yaml index 7d75c4d..c05cc3b 100644 --- a/atlantis.yaml +++ b/atlantis.yaml @@ -1,323 +1,323 @@ version: 3 -automerge: true +automerge: true # Pr을 날렸고 승인이 됐을 때 projects: - - name: init/zerone-id - dir: terraform/init/zerone-id + - name: ecr/dg-id/ap-northeast-2 + dir: terraform/ecr/dg-id/ap-northeast-2 workspace: default terraform_version: 1.3.7 autoplan: when_modified: [ - "*.tf" - ] + "*.tf", # dg-id 안의 테라폼의 설정파일이 변경 됐을때 실행 + ] enabled: true apply_requirements: [] workflow: id - - name: vpc/tmcd_apnortheast2 - dir: terraform/vpc/tmcd_apnortheast2 - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "*.tfvars" - ] - enabled: true - apply_requirements: [] - workflow: id +# - name: vpc/tmcd_apnortheast2 +# dir: terraform/vpc/tmcd_apnortheast2 +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "*.tfvars" +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: vpc/testd_apnortheast2 - dir: terraform/vpc/testd_apnortheast2 - workspace: default - terraform_version: 1.5.7 - autoplan: - when_modified: [ - "*.tf", - "*.tfvars" - ] - enabled: true - apply_requirements: [] - workflow: id +# - name: vpc/testd_apnortheast2 +# dir: terraform/vpc/testd_apnortheast2 +# workspace: default +# terraform_version: 1.5.7 +# autoplan: +# when_modified: [ +# "*.tf", +# "*.tfvars" +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: iam/zerone-id - dir: terraform/iam/zerone-id - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf" - ] - enabled: true - apply_requirements: [] - workflow: id +# - name: iam/dg-id +# dir: terraform/iam/dg-id +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf" +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: kms/zerone-id/ap-northeast-2 - dir: terraform/kms/zerone-id/ap-northeast-2 - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf" - ] - enabled: true - apply_requirements: [] - workflow: id - - - name: ssm/zerone-id/ap-northeast-2 - dir: terraform/ssm/zerone-id/ap-northeast-2 - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "secrets.sops.yaml" - ] - enabled: true - apply_requirements: [] - workflow: id +# - name: kms/dg-id/ap-northeast-2 +# dir: terraform/kms/dg-id/ap-northeast-2 +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf" +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: ecr/zerone-id/ap-northeast-2 - dir: terraform/ecr/zerone-id/ap-northeast-2 - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf" - ] - enabled: true - apply_requirements: [] - workflow: id +# - name: ssm/dg-id/ap-northeast-2 +# dir: terraform/ssm/dg-id/ap-northeast-2 +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "secrets.sops.yaml" +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: securitygroup/zerone-id/tmcd_apnortheast2 - dir: terraform/securitygroup/zerone-id/tmcd_apnortheast2 - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "terraform.tfvars" - ] - enabled: true - apply_requirements: [] - workflow: id +# - name: ecr/dg-id/ap-northeast-2 +# dir: terraform/ecr/dg-id/ap-northeast-2 +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf" +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: codebuild/zerone-id/tmcd_apnortheast2 - dir: terraform/codebuild/zerone-id/tmcd_apnortheast2 - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "terraform.tfvars", - "secrets.sops.yaml" - ] - enabled: true - apply_requirements: [] - workflow: id +# - name: securitygroup/dg-id/tmcd_apnortheast2 +# dir: terraform/securitygroup/dg-id/tmcd_apnortheast2 +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "terraform.tfvars" +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: acm/zerone-id/ap-northeast-2 - dir: terraform/acm/zerone-id/ap-northeast-2 - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "terraform.tfvars", - ] - enabled: true - apply_requirements: [] - workflow: id +# - name: codebuild/dg-id/tmcd_apnortheast2 +# dir: terraform/codebuild/dg-id/tmcd_apnortheast2 +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "terraform.tfvars", +# "secrets.sops.yaml" +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: platform/jenkins/tmcd_apnortheast2 - dir: terraform/platform/jenkins/tmcd_apnortheast2 - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "terraform.tfvars", - ] - enabled: true - apply_requirements: [] - workflow: id +# - name: acm/dg-id/ap-northeast-2 +# dir: terraform/acm/dg-id/ap-northeast-2 +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "terraform.tfvars", +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: secretsmanager/zerone-id/ap-northeast-2 - dir: terraform/secretsmanager/zerone-id/ap-northeast-2 - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "terraform.tfvars", - "*.sops.yaml" - ] - enabled: true - apply_requirements: [] - workflow: id +# - name: platform/jenkins/tmcd_apnortheast2 +# dir: terraform/platform/jenkins/tmcd_apnortheast2 +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "terraform.tfvars", +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: ecs/demo/tmcd_apnortheast2 - dir: terraform/ecs/demo/tmcd_apnortheast2 - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "terraform.tfvars", - ] - enabled: true - apply_requirements: [] - workflow: id +# - name: secretsmanager/dg-id/ap-northeast-2 +# dir: terraform/secretsmanager/dg-id/ap-northeast-2 +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "terraform.tfvars", +# "*.sops.yaml" +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: codedeploy/zerone-id/ap-northeast-2 - dir: terraform/codedeploy/zerone-id/ap-northeast-2 - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "terraform.tfvars", - ] - enabled: true - apply_requirements: [] - workflow: id +# - name: ecs/demo/tmcd_apnortheast2 +# dir: terraform/ecs/demo/tmcd_apnortheast2 +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "terraform.tfvars", +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: s3/zerone-id - dir: terraform/s3/zerone-id - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "terraform.tfvars", - ] - enabled: true - apply_requirements: [] - workflow: id +# - name: codedeploy/dg-id/ap-northeast-2 +# dir: terraform/codedeploy/dg-id/ap-northeast-2 +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "terraform.tfvars", +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: services/demoapp/tmcd_apnortheast2 - dir: terraform/services/demoapp/tmcd_apnortheast2 - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "terraform.tfvars", - ] - enabled: true - apply_requirements: [] - workflow: id - - - name: eks/tmcd_apnortheast2/tmcdapne2-nhwy - dir: terraform/eks/tmcd_apnortheast2/tmcdapne2-nhwy - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "terraform.tfvars", - ] - enabled: true - apply_requirements: [] - workflow: id -### github - - name: github/springboot-sample - dir: github/springboot-sample - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "*.yaml" - ] - enabled: true - apply_requirements: [] - workflow: github +# - name: s3/dg-id +# dir: terraform/s3/dg-id +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "terraform.tfvars", +# ] +# enabled: true +# apply_requirements: [] +# workflow: id - - name: github/terraform-provisioning - dir: github/terraform-provisioning - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - "*.yaml" - ] - enabled: true - apply_requirements: [] - workflow: github +# - name: services/demoapp/tmcd_apnortheast2 +# dir: terraform/services/demoapp/tmcd_apnortheast2 +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "terraform.tfvars", +# ] +# enabled: true +# apply_requirements: [] +# workflow: id -### datadog - - name: datadog/integration - dir: datadog/integration - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - ] - enabled: true - apply_requirements: [] - workflow: datadog +# - name: eks/tmcd_apnortheast2/tmcdapne2-nhwy +# dir: terraform/eks/tmcd_apnortheast2/tmcdapne2-nhwy +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "terraform.tfvars", +# ] +# enabled: true +# apply_requirements: [] +# workflow: id +# ### github +# - name: github/springboot-sample +# dir: github/springboot-sample +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "*.yaml" +# ] +# enabled: true +# apply_requirements: [] +# workflow: github - - name: datadog/monitor - dir: datadog/monitor - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - ] - enabled: true - apply_requirements: [] - workflow: datadog +# - name: github/terraform-provisioning +# dir: github/terraform-provisioning +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# "*.yaml" +# ] +# enabled: true +# apply_requirements: [] +# workflow: github - - name: datadog/dashboard - dir: datadog/dashboard - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - ] - enabled: true - apply_requirements: [] - workflow: datadog -### sumologic - - name: sumologic/collector - dir: sumologic/collector - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf" - ] - enabled: true - apply_requirements: [] - workflow: sumologic +# ### datadog +# - name: datadog/integration +# dir: datadog/integration +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# ] +# enabled: true +# apply_requirements: [] +# workflow: datadog - - name: sumologic/partition - dir: sumologic/partition - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf" - ] - enabled: true - apply_requirements: [] - workflow: sumologic +# - name: datadog/monitor +# dir: datadog/monitor +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# ] +# enabled: true +# apply_requirements: [] +# workflow: datadog - - name: sumologic/sources/vpcflow - dir: sumologic/sources/vpcflow - workspace: default - terraform_version: 1.7.0 - autoplan: - when_modified: [ - "*.tf", - ] - enabled: true - apply_requirements: [] - workflow: sumologic +# - name: datadog/dashboard +# dir: datadog/dashboard +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# ] +# enabled: true +# apply_requirements: [] +# workflow: datadog +# ### sumologic +# - name: sumologic/collector +# dir: sumologic/collector +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf" +# ] +# enabled: true +# apply_requirements: [] +# workflow: sumologic + +# - name: sumologic/partition +# dir: sumologic/partition +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf" +# ] +# enabled: true +# apply_requirements: [] +# workflow: sumologic + +# - name: sumologic/sources/vpcflow +# dir: sumologic/sources/vpcflow +# workspace: default +# terraform_version: 1.7.0 +# autoplan: +# when_modified: [ +# "*.tf", +# ] +# enabled: true +# apply_requirements: [] +# workflow: sumologic #### Workflows ##### workflows: @@ -326,63 +326,71 @@ workflows: plan: steps: - init: - extra_args: [ - '-backend-config="role_arn=arn:aws:iam::066346343248:role/atlantis-zerone-id-admin"', - '-upgrade=false' - ] + extra_args: + [ + '-backend-config="role_arn=arn:aws:iam::545009828941:role/atlantis-dg-id-admin"', + "-upgrade=false", + ] - plan: - extra_args: [ - "-var 'assume_role_arn=arn:aws:iam::066346343248:role/atlantis-zerone-id-admin'" - ] + extra_args: + [ + "-var 'assume_role_arn=arn:aws:iam::545009828941:role/atlantis-dg-id-admin'", + ] apply: steps: - apply - # github - github: - plan: - steps: - - init: - extra_args: [ - '-backend-config="role_arn=arn:aws:iam::066346343248:role/atlantis-zerone-id-admin"', - '-upgrade=false' - ] - - plan: - extra_args: [ - "-var 'assume_role_arn=arn:aws:iam::066346343248:role/atlantis-zerone-id-admin'" - ] - apply: - steps: - - apply - # datadog - datadog: - plan: - steps: - - init: - extra_args: [ - '-backend-config="role_arn=arn:aws:iam::066346343248:role/atlantis-zerone-id-admin"', - '-upgrade=false' - ] - - plan: - extra_args: [ - "-var 'assume_role_arn=arn:aws:iam::066346343248:role/atlantis-zerone-id-admin'" - ] - apply: - steps: - - apply + # # github + # github: + # plan: + # steps: + # - init: + # extra_args: + # [ + # '-backend-config="role_arn=arn:aws:iam::066346343248:role/atlantis-dg-id-admin"', + # "-upgrade=false", + # ] + # - plan: + # extra_args: + # [ + # "-var 'assume_role_arn=arn:aws:iam::066346343248:role/atlantis-dg-id-admin'", + # ] + # apply: + # steps: + # - apply + # # datadog + # datadog: + # plan: + # steps: + # - init: + # extra_args: + # [ + # '-backend-config="role_arn=arn:aws:iam::066346343248:role/atlantis-dg-id-admin"', + # "-upgrade=false", + # ] + # - plan: + # extra_args: + # [ + # "-var 'assume_role_arn=arn:aws:iam::066346343248:role/atlantis-dg-id-admin'", + # ] + # apply: + # steps: + # - apply - sumologic: - plan: - steps: - - init: - extra_args: [ - '-backend-config="role_arn=arn:aws:iam::066346343248:role/atlantis-zerone-id-admin"', - '-upgrade=false' - ] - - plan: - extra_args: [ - "-var 'assume_role_arn=arn:aws:iam::066346343248:role/atlantis-zerone-id-admin'" - ] - apply: - steps: - - apply \ No newline at end of file + # sumologic: + # plan: + # steps: + # - init: + # extra_args: + # [ + # '-backend-config="role_arn=arn:aws:iam::066346343248:role/atlantis-dg-id-admin"', + # "-upgrade=false", + # ] + # - plan: + # extra_args: + # [ + # "-var 'assume_role_arn=arn:aws:iam::066346343248:role/atlantis-dg-id-admin'", + # ] + # apply: + # steps: + # - apply diff --git a/terraform/ecr/zerone-id/ap-northeast-2/.terraform.lock.hcl b/terraform/ecr/dg-id/ap-northeast-2/.terraform.lock.hcl similarity index 100% rename from terraform/ecr/zerone-id/ap-northeast-2/.terraform.lock.hcl rename to terraform/ecr/dg-id/ap-northeast-2/.terraform.lock.hcl diff --git a/terraform/ecr/dg-id/ap-northeast-2/backend.tf b/terraform/ecr/dg-id/ap-northeast-2/backend.tf new file mode 100644 index 0000000..342bed0 --- /dev/null +++ b/terraform/ecr/dg-id/ap-northeast-2/backend.tf @@ -0,0 +1,12 @@ +terraform { + required_version = ">= 1.0.0" + + backend "s3" { + bucket = "dg-id-apnortheast2-tfstate" + key = "provisioning/terraform/ecr/dg-id/ap-northeast-2/terraform.tfstate" + region = "ap-northeast-2" + encrypt = true + dynamodb_table = "terraform-lock-table" + } +} + diff --git a/terraform/ecr/zerone-id/ap-northeast-2/demoapp.tf b/terraform/ecr/dg-id/ap-northeast-2/demoapp.tf similarity index 100% rename from terraform/ecr/zerone-id/ap-northeast-2/demoapp.tf rename to terraform/ecr/dg-id/ap-northeast-2/demoapp.tf diff --git a/terraform/ecr/zerone-id/ap-northeast-2/provider.tf b/terraform/ecr/dg-id/ap-northeast-2/provider.tf similarity index 100% rename from terraform/ecr/zerone-id/ap-northeast-2/provider.tf rename to terraform/ecr/dg-id/ap-northeast-2/provider.tf diff --git a/terraform/ecr/zerone-id/ap-northeast-2/sample.tf b/terraform/ecr/dg-id/ap-northeast-2/sample.tf similarity index 79% rename from terraform/ecr/zerone-id/ap-northeast-2/sample.tf rename to terraform/ecr/dg-id/ap-northeast-2/sample.tf index 6ac72d5..4a0a9b0 100644 --- a/terraform/ecr/zerone-id/ap-northeast-2/sample.tf +++ b/terraform/ecr/dg-id/ap-northeast-2/sample.tf @@ -1,12 +1,12 @@ -resource "aws_ecr_repository" "sample" { - name = "sample" +resource "aws_ecr_repository" "demo" { + name = "demo" image_scanning_configuration { scan_on_push = true } image_tag_mutability = "IMMUTABLE" } -resource "aws_ecr_repository_policy" "sample" { - repository = aws_ecr_repository.sample.name +resource "aws_ecr_repository_policy" "demo" { + repository = aws_ecr_repository.demo.name policy = jsonencode({ "Version" : "2008-10-17", "Statement" : [ diff --git a/terraform/ecr/zerone-id/ap-northeast-2/var_global.tf b/terraform/ecr/dg-id/ap-northeast-2/var_global.tf similarity index 100% rename from terraform/ecr/zerone-id/ap-northeast-2/var_global.tf rename to terraform/ecr/dg-id/ap-northeast-2/var_global.tf diff --git a/terraform/ecr/zerone-id/ap-northeast-2/variables.tf b/terraform/ecr/dg-id/ap-northeast-2/variables.tf similarity index 100% rename from terraform/ecr/zerone-id/ap-northeast-2/variables.tf rename to terraform/ecr/dg-id/ap-northeast-2/variables.tf diff --git a/terraform/ecr/zerone-id/provider.tf b/terraform/ecr/dg-id/provider.tf similarity index 100% rename from terraform/ecr/zerone-id/provider.tf rename to terraform/ecr/dg-id/provider.tf diff --git a/terraform/ecr/zerone-id/ap-northeast-2/backend.tf b/terraform/ecr/zerone-id/ap-northeast-2/backend.tf deleted file mode 100644 index 8d731b8..0000000 --- a/terraform/ecr/zerone-id/ap-northeast-2/backend.tf +++ /dev/null @@ -1,12 +0,0 @@ -terraform { - required_version = ">= 1.0.0" - - backend "s3" { - bucket = "zerone-id-apnortheast2-tfstate" - key = "provisioning/terraform/ecr/zerone-id/ap-northeast-2/terraform.tfstate" - region = "ap-northeast-2" - encrypt = true - dynamodb_table = "terraform-lock" - } -} - diff --git a/terraform/init/zerone-id/.terraform.lock.hcl b/terraform/init/dg-id/.terraform.lock.hcl similarity index 100% rename from terraform/init/zerone-id/.terraform.lock.hcl rename to terraform/init/dg-id/.terraform.lock.hcl diff --git a/terraform/init/zerone-id/init.tf b/terraform/init/dg-id/init.tf similarity index 86% rename from terraform/init/zerone-id/init.tf rename to terraform/init/dg-id/init.tf index 5407f45..658189f 100644 --- a/terraform/init/zerone-id/init.tf +++ b/terraform/init/dg-id/init.tf @@ -3,7 +3,7 @@ provider "aws" { } resource "aws_s3_bucket" "tfstate" { - bucket = "zerone-id-apnortheast2-tfstate" + bucket = "dg-id-apnortheast2-tfstate" } resource "aws_s3_bucket_versioning" "versioning" { diff --git a/terraform/init/zerone-id/terraform.tfstate b/terraform/init/zerone-id/terraform.tfstate deleted file mode 100644 index d275efd..0000000 --- a/terraform/init/zerone-id/terraform.tfstate +++ /dev/null @@ -1,166 +0,0 @@ -{ - "version": 4, - "terraform_version": "1.9.2", - "serial": 4, - "lineage": "134c8286-fb5d-6914-9017-675e5fd73df8", - "outputs": {}, - "resources": [ - { - "mode": "managed", - "type": "aws_dynamodb_table", - "name": "terraform_state_lock", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 1, - "attributes": { - "arn": "arn:aws:dynamodb:ap-northeast-2:066346343248:table/terraform-lock", - "attribute": [ - { - "name": "LockID", - "type": "S" - } - ], - "billing_mode": "PAY_PER_REQUEST", - "deletion_protection_enabled": false, - "global_secondary_index": [], - "hash_key": "LockID", - "id": "terraform-lock", - "import_table": [], - "local_secondary_index": [], - "name": "terraform-lock", - "point_in_time_recovery": [ - { - "enabled": false - } - ], - "range_key": null, - "read_capacity": 0, - "replica": [], - "restore_date_time": null, - "restore_source_name": null, - "restore_to_latest_time": null, - "server_side_encryption": [], - "stream_arn": "", - "stream_enabled": false, - "stream_label": "", - "stream_view_type": "", - "table_class": "STANDARD", - "tags": null, - "tags_all": {}, - "timeouts": null, - "ttl": [ - { - "attribute_name": "", - "enabled": false - } - ], - "write_capacity": 0 - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjYwMDAwMDAwMDAwMCwidXBkYXRlIjozNjAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=" - } - ] - }, - { - "mode": "managed", - "type": "aws_s3_bucket", - "name": "tfstate", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "acceleration_status": "", - "acl": null, - "arn": "arn:aws:s3:::zerone-id-apnortheast2-tfstate", - "bucket": "zerone-id-apnortheast2-tfstate", - "bucket_domain_name": "zerone-id-apnortheast2-tfstate.s3.amazonaws.com", - "bucket_prefix": "", - "bucket_regional_domain_name": "zerone-id-apnortheast2-tfstate.s3.ap-northeast-2.amazonaws.com", - "cors_rule": [], - "force_destroy": false, - "grant": [ - { - "id": "b7eb51886025d30664bdc82bcd99dc983b004ba4286caa0adc20343f049c91ae", - "permissions": [ - "FULL_CONTROL" - ], - "type": "CanonicalUser", - "uri": "" - } - ], - "hosted_zone_id": "Z3W03O7B5YMIYP", - "id": "zerone-id-apnortheast2-tfstate", - "lifecycle_rule": [], - "logging": [], - "object_lock_configuration": [], - "object_lock_enabled": false, - "policy": "", - "region": "ap-northeast-2", - "replication_configuration": [], - "request_payer": "BucketOwner", - "server_side_encryption_configuration": [ - { - "rule": [ - { - "apply_server_side_encryption_by_default": [ - { - "kms_master_key_id": "", - "sse_algorithm": "AES256" - } - ], - "bucket_key_enabled": false - } - ] - } - ], - "tags": null, - "tags_all": {}, - "timeouts": null, - "versioning": [ - { - "enabled": false, - "mfa_delete": false - } - ], - "website": [], - "website_domain": null, - "website_endpoint": null - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjM2MDAwMDAwMDAwMDAsInJlYWQiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19" - } - ] - }, - { - "mode": "managed", - "type": "aws_s3_bucket_versioning", - "name": "versioning_example", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "bucket": "zerone-id-apnortheast2-tfstate", - "expected_bucket_owner": "", - "id": "zerone-id-apnortheast2-tfstate", - "mfa": null, - "versioning_configuration": [ - { - "mfa_delete": "", - "status": "Enabled" - } - ] - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "aws_s3_bucket.tfstate" - ] - } - ] - } - ], - "check_results": null -} diff --git a/terraform/variables/var_global.tf b/terraform/variables/var_global.tf index da16b68..39508ec 100644 --- a/terraform/variables/var_global.tf +++ b/terraform/variables/var_global.tf @@ -13,10 +13,10 @@ variable "atlantis_user" { # Add all account ID to here variable "account_id" { default = { - id = "066346343248" - art-id = "816736805842" - datadog = "464622532012" - sumologic = "926226587429" + id = "545009828941" + # art-id = "816736805842" + # datadog = "464622532012" + # sumologic = "926226587429" } } @@ -26,24 +26,24 @@ variable "remote_state" { default = { vpc = { tmcd_apnortheast2 = { - bucket = "zerone-id-apnortheast2-tfstate" + bucket = "dg-id-apnortheast2-tfstate" key = "provisioning/terraform/vpc/tmcd_apnortheast2/terraform.tfstate" region = "ap-northeast-2" } } iam = { - zerone-id = { - bucket = "zerone-id-apnortheast2-tfstate" - key = "provisioning/terraform/iam/zerone-id/terraform.tfstate" + dg-id = { + bucket = "dg-id-apnortheast2-tfstate" + key = "provisioning/terraform/iam/dg-id/terraform.tfstate" region = "ap-northeast-2" } } kms = { - zerone-id = { + dg-id = { apne2 = { - bucket = "zerone-id-apnortheast2-tfstate" - key = "provisioning/terraform/kms/zerone-id/ap-northeast-2/terraform.tfstate" + bucket = "dg-id-apnortheast2-tfstate" + key = "provisioning/terraform/kms/dg-id/ap-northeast-2/terraform.tfstate" region = "ap-northeast-2" } } @@ -52,14 +52,14 @@ variable "remote_state" { ecs = { nginx = { tmcdapne2 = { - bucket = "zerone-id-apnortheast2-tfstate" + bucket = "dg-id-apnortheast2-tfstate" key = "provisioning/terraform/ecs/nginx/tmcd_apnortheast2/terraform.tfstate" region = "ap-northeast-2" } } demo = { tmcdapne2 = { - bucket = "zerone-id-apnortheast2-tfstate" + bucket = "dg-id-apnortheast2-tfstate" key = "provisioning/terraform/ecs/demo/tmcd_apnortheast2/terraform.tfstate" region = "ap-northeast-2" } @@ -67,19 +67,19 @@ variable "remote_state" { } security_group = { - zerone-id = { + dg-id = { tmcdapne2 = { - bucket = "zerone-id-apnortheast2-tfstate" - key = "provisioning/terraform/securitygroup/zerone-id/tmcd_apnortheast2/terraform.tfstate" + bucket = "dg-id-apnortheast2-tfstate" + key = "provisioning/terraform/securitygroup/dg-id/tmcd_apnortheast2/terraform.tfstate" region = "ap-northeast-2" } } } codedeploy = { - zerone-id = { + dg-id = { apne2 = { - bucket = "zerone-id-apnortheast2-tfstate" + bucket = "dg-id-apnortheast2-tfstate" key = "provisioning/terraform/codedeploy/ap-northeast-2/terraform.tfstate" region = "ap-northeast-2" } @@ -87,10 +87,10 @@ variable "remote_state" { } secretsmanager = { - zerone-id = { + dg-id = { apne2 = { - bucket = "zerone-id-apnortheast2-tfstate" - key = "provisioning/terraform/secretsmanager/zerone-id/ap-northeast-2/terraform.tfstate" + bucket = "dg-id-apnortheast2-tfstate" + key = "provisioning/terraform/secretsmanager/dg-id/ap-northeast-2/terraform.tfstate" region = "ap-northeast-2" } } @@ -98,16 +98,16 @@ variable "remote_state" { eks = { tmcdapne2-nhwy = { - bucket = "zerone-id-apnortheast2-tfstate" + bucket = "dg-id-apnortheast2-tfstate" key = "provisioning/terraform/eks/tmcd_apnortheast2/tmcdapne2-nhwy/terraform.tfstate" region = "ap-northeast-2" } } s3 = { - zerone-id = { - bucket = "zerone-id-apnortheast2-tfstate" - key = "provisioning/terraform/s3/zerone-id/terraform.tfstate" + dg-id = { + bucket = "dg-id-apnortheast2-tfstate" + key = "provisioning/terraform/s3/dg-id/terraform.tfstate" region = "ap-northeast-2" } }