Skip to content

Commit

Permalink
Change gcp to aws for terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
w1mvy committed Aug 18, 2021
1 parent baefbef commit 1303105
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions test-fixtures/storage_gcs/config.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,37 @@
terraform {
# https://www.terraform.io/docs/backends/types/gcs.html
backend "gcs" {
bucket = "tfmigrate-gcs"
prefix = "tfmigrate"
# https://www.terraform.io/docs/backends/types/s3.html
backend "s3" {
region = "ap-northeast-1"
bucket = "tfstate-test"
key = "test/terraform.tfstate"

// mock s3 endpoint with localstack
endpoint = "http://localstack:4566"
access_key = "dummy"
secret_key = "dummy"
skip_credentials_validation = true
skip_metadata_api_check = true
force_path_style = true
}
}

# https://www.terraform.io/docs/providers/aws/index.html
# https://www.terraform.io/docs/providers/aws/guides/custom-service-endpoints.html#localstack
provider "aws" {
region = "ap-northeast-1"

access_key = "dummy"
secret_key = "dummy"
skip_credentials_validation = true
skip_metadata_api_check = true
skip_region_validation = true
skip_requesting_account_id = true
s3_force_path_style = true

// mock endpoints with localstack
endpoints {
s3 = "http://localstack:4566"
ec2 = "http://localstack:4566"
iam = "http://localstack:4566"
}
}

0 comments on commit 1303105

Please sign in to comment.