Last active
August 14, 2021 19:08
-
-
Save diegopacheco/6c2fe827444d4f3a350ba1f477a7d1e4 to your computer and use it in GitHub Desktop.
Terraform + Localstack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "us-west-2" | |
access_key = "anaccesskey" | |
secret_key = "asecretkey" | |
skip_credentials_validation = true | |
skip_metadata_api_check = true | |
s3_force_path_style = true | |
endpoints { | |
s3 = "http://119.18.0.101:4572" | |
} | |
} | |
resource "aws_s3_bucket" "b" { | |
bucket = "my-tf-test-bucket" | |
acl = "public-read" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output "address" { | |
value = "${aws_s3_bucket.b.bucket}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "aws_region" { | |
description = "AWS region to launch servers." | |
default = "us-west-2" | |
} | |
variable "key_name" { | |
description = "Name of the SSH keypair to use in AWS." | |
default = "deployer-ley" | |
} | |
variable "key_path" { | |
description = "Path to the private portion of the SSH key specified." | |
default = "~/pem.pem" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why I should set up s3 endpoint to
119.18.0.101
inmain.tf
line 9?It's not a reserved ip address.