Closed spanktar closed 8 years ago
Hi @spanktar
Thanks for the report here - sorry this is causing pain right now. I see that you are using Terraform 0.6.12 here - we just released 0.6.16 yesterday - can you try the latest version and see if the issue exists?
A lot of bug fixes have been pushed out over the past few months and we should be sure that the issue still exists on the latest before we can look into this
Thanks
Paul
Thanks for the reply! The reason I'm using v0.6.12 (and 14) is that there's a problem with queues that's preventing me from going past 0.6.15.
I just disabled the queues and tested with 0.6.15 and 0.6.16, same result:
elasticache_primary_address = B780FFEC-B661-4EB8-9236-A01737AD98B6
Hi @spanktar
Thanks for the details here - this will help try and diagnose the issue
Paul
I tried to use cloud_formation_stack to get around the following issue:
https://github.com/hashicorp/terraform/issues/4946
But this bug prevents me doing this, effectively making either option not possible. Any fix or addition for either would be greatly appreciated!
Maybe related? #4761
To work around this issue in the meantime, I've created a t2.micro "service instance" that depends on the CF stack that simply queries the AWS API, gets the value and pushes it to Consul. It's a hack, but it accomplishes the goal.
I am also running into this issue. I need to create lambda function that is referencing an ECS Task arn that is created in terraform. I created a cloudformation resource to allow me to create a more dynamic lambda function, but when retrieving outputs I am met with
cf_outputs = B780FFEC-B661-4EB8-9236-A01737AD98B6
I am also on 0.6.16 of Terraform
@stack72 I just saw this posted here #2708
I am supposing there is an error in parsing cloudformation Outputs, I don't know if this was caused by a change in the aws-sdk-go, or if the delimitting string is somehow being interfered with.
EDIT: Minimal Reproduction
provider "aws" {
region = "us-east-1"
}
resource "aws_cloudformation_stack" "testing" {
name = "terraform-test"
template_body = <<STACK
{
"AWSTemplateFormatVersion":"2010-09-09",
"Resources" : {
"eip":{
"Type" : "AWS::EC2::EIP",
"Properties" : {
"Domain" : "vpc"
}
}
},
"Outputs" : {
"test" : {
"Description" : "Testing outputs",
"Value": { "Fn::GetAtt" : ["eip", "AllocationId"] }
}
}
}
STACK
}
output "cf_outputs" {
value = "${aws_cloudformation_stack.testing.outputs}"
}
Interestingly enough, you can delete the outputs of the CFT, destroy, recreate, and still get the same "output"
See: https://github.com/hashicorp/terraform/issues/7914
try:
value = "${aws_cloudformation_stack.testing.outputs["AllocationId"]}"
and watch the nested quotes, they're required. Works in v0.7.4
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.
When using a CloudFormation template to create an ElastiCache replication cluster, I added some outputs so I could get the EC Cluster's primary address (for eventual use in Consul). Instead of getting the expected output value (
imi1dyi60vqjp42a.FOO.ng.0001.usw2.cache.amazonaws.com:6379
) I got the following string:B780FFEC-B661-4EB8-9236-A01737AD98B6
. All other outputs are working correctly.Terraform Version
Terraform v0.6.12
Affected Resource(s)
Terraform Configuration Files
cloudformation_template_snippet
terraform file snippet
Expected Behavior
I would expect to the the value defined as the output in my AWS CF template (PrimaryEndPoint.Address) as the output. This output is working correctly, as I can see it in the ElastiCache AWS Console or the CloudFormation Stack's OUTPUT tab.
Actual Behavior
Instead, I got the following value:
B780FFEC-B661-4EB8-9236-A01737AD98B6
which doesn't seem to correspond to anything in particularImportant Factoids
When I destroyed the CF stack and created a new one with
terraform apply
, I got the same string again. I expected that this string would be different on each run.