-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
aws_opsworks_instance doesn't properly export private_ip when creating the instance #9959
Comments
So I did a little more work here trying to figure out how to hack around it and came up with something interesting. I wrote a
|
getting the same issue, tried adding a wait but didn't work, had to run apply twice |
A second apply always works for me. |
Consider the following code: err := startOpsworksInstance(d, meta, false) func startOpsworksInstance(d *schema.ResourceData, meta interface{}, wait bool) error {} It seems we never wait until the instance is running. There is no |
…specified Fixes: #9959 When we specify that we want an opsworks_instance state of running, we should wait for that the be the case. This will then allow us to use the Computed values (e.g. private_ip) etc and allow us to use provisioners as part of the terraform config ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSOpsworksInstance' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/03/30 20:55:21 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSOpsworksInstance -timeout 120m === RUN TestAccAWSOpsworksInstance_importBasic --- PASS: TestAccAWSOpsworksInstance_importBasic (72.28s) === RUN TestAccAWSOpsworksInstance --- PASS: TestAccAWSOpsworksInstance (110.17s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 182.479s ```
…specified (#13218) Fixes: #9959 When we specify that we want an opsworks_instance state of running, we should wait for that the be the case. This will then allow us to use the Computed values (e.g. private_ip) etc and allow us to use provisioners as part of the terraform config ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSOpsworksInstance' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/03/30 20:55:21 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSOpsworksInstance -timeout 120m === RUN TestAccAWSOpsworksInstance_importBasic --- PASS: TestAccAWSOpsworksInstance_importBasic (72.28s) === RUN TestAccAWSOpsworksInstance --- PASS: TestAccAWSOpsworksInstance (110.17s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 182.479s ```
btw, this issue is still present in 0.9.2 (ps: didn't notice that fix was merged only a week ago) |
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. |
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
Terraform v0.7.9
Affected Resource(s)
Please list the resources as a list, for example:
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Expected Behavior
Terraform waits for the the newly created opsworks instances to get assigned a private ip and then references them.
Actual Behavior
Terraform appears to not wait for the private ips to be assigned and thus we get an empty reference for the private ip.
The text was updated successfully, but these errors were encountered: