-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash with AWS provider creating aws_instance #19167
Comments
I should note that I was able to use the AWS provider to create a VPC with some simple code: provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
tags = {
Name = "roger-test-0.12"
}
} |
Noting that this is the same crash as #19152. |
Strangely, my AWS example works if I add a credit_specification block at the end: terraform {
required_version = ">= 0.12.0"
}
provider "aws" {
region = var.aws_region
}
resource "aws_instance" "ubuntu" {
ami = var.ami_id
instance_type = var.instance_type
availability_zone = format("%sb", var.aws_region)
tags = {
Name = var.name
owner = "[email protected]"
ttl = "-1"
}
credit_specification {
cpu_credits = "unlimited"
}
} I discovered this accidentally while implementing this example. That example works with either the credit_specification or network_interface block or both of them. |
I just verified that this is fixed with #19201 |
(Note that it requires a rebuilt AWS provider against an updated Terraform vendor) |
Thanks @mitchellh |
I can verify this is fixed in 0.12 alpha-2 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
Terraform Configuration Files
Debug Output
https://gist.github.com/rberlind/fbac8ad21e592649e939fa89b8874c6e
Crash Output
https://gist.github.com/rberlind/b5b8dc06fc289725a8a2fe6b0801b3ea
Expected Behavior
Apply should have worked.
Actual Behavior
Crash.
Steps to Reproduce
Additional Context
The panic message I saw in the crash ("can't use ElementIterator on null value") is the same as in #19152 even though I used the AWS provider and that issue used the Google provider.
Note that I did use the AWS provider that was bundled with the Terraform 0.12 alpha-1
References
Possibly #19152
The text was updated successfully, but these errors were encountered: