Last active
February 3, 2021 21:04
-
-
Save toddlers/6b54ff01cb8e8eb5ebdfd28c401b58c1 to your computer and use it in GitHub Desktop.
terraform aws provider 3.23 with role and profile
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
$ terraform init | |
Initializing the backend... | |
Initializing provider plugins... | |
- Reusing previous version of hashicorp/aws from the dependency lock file | |
- Installing hashicorp/aws v3.23.0... | |
- Installed hashicorp/aws v3.23.0 (signed by HashiCorp) | |
Warning: Version constraints inside provider configuration blocks are deprecated | |
on main.tf line 2, in provider "aws": | |
2: version = "3.23" | |
Terraform 0.13 and earlier allowed provider version constraints inside the | |
provider configuration block, but that is now deprecated and will be removed | |
in a future version of Terraform. To silence this warning, move the provider | |
version constraint into the required_providers block. | |
Terraform has been successfully initialized! | |
You may now begin working with Terraform. Try running "terraform plan" to see | |
any changes that are required for your infrastructure. All Terraform commands | |
should now work. | |
If you ever set or change modules or backend configuration for Terraform, | |
rerun this command to reinitialize your working directory. If you forget, other | |
commands will detect it and remind you to do so if necessary. | |
$ terraform plan | |
An execution plan has been generated and is shown below. | |
Resource actions are indicated with the following symbols: | |
+ create | |
Terraform will perform the following actions: | |
# aws_sns_topic.user_updates will be created | |
+ resource "aws_sns_topic" "user_updates" { | |
+ arn = (known after apply) | |
+ id = (known after apply) | |
+ name = "user-updates-topic" | |
+ policy = (known after apply) | |
} | |
Plan: 1 to add, 0 to change, 0 to destroy. | |
Warning: Version constraints inside provider configuration blocks are deprecated | |
on main.tf line 2, in provider "aws": | |
2: version = "3.23" | |
Terraform 0.13 and earlier allowed provider version constraints inside the | |
provider configuration block, but that is now deprecated and will be removed | |
in a future version of Terraform. To silence this warning, move the provider | |
version constraint into the required_providers block. | |
------------------------------------------------------------------------ | |
Note: You didn't specify an "-out" parameter to save this plan, so Terraform | |
can't guarantee that exactly these actions will be performed if | |
"terraform apply" is subsequently run. | |
$ cat main.tf | |
provider "aws" { | |
version = "3.23" | |
region = "us-east-1" | |
profile = "test" | |
assume_role { | |
role_arn = "arn:aws:iam::1234567890:role/Role" | |
} | |
} | |
resource "aws_sns_topic" "user_updates" { | |
name = "user-updates-topic" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment