Skip to content
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

provider/aws: Add cloudformation_stack data source #8640

Merged

Conversation

radeksimko
Copy link
Member

Test plan

make testacc TEST=./builtin/providers/aws TESTARGS='-run=AWSCloudFormationStack_dataSource'
TF_ACC=1 go test ./builtin/providers/aws -v -run=AWSCloudFormationStack_dataSource -timeout 120m
=== RUN   TestAccAWSCloudFormationStack_dataSource_basic
--- PASS: TestAccAWSCloudFormationStack_dataSource_basic (87.58s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    87.597s

@apparentlymart
Copy link
Contributor

This is a neat idea! Seems like it makes cloudformation stacks act a bit like terrafrom_remote_states in that you can derive resources from them, so could use cloudformation to build some foundational stuff and then use it within Terraform.

I don't really know cloudformation enough (at all!) to be of much use in reviewing this in detail, but the general mechanism/flow looks reasonable to me.

@jen20
Copy link
Contributor

jen20 commented Sep 3, 2016

👍 This is a great idea! Going to look at pulling it in now.

@jen20
Copy link
Contributor

jen20 commented Sep 3, 2016

$ make testacc TEST=./builtin/providers/aws TESTARGS="-run TestAccAWSCloudFormationStack_dataSource_basic"
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/03 14:13:10 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run TestAccAWSCloudFormationStack_dataSource_basic -timeout 120m
=== RUN   TestAccAWSCloudFormationStack_dataSource_basic
--- PASS: TestAccAWSCloudFormationStack_dataSource_basic (66.45s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    66.471s

Thanks @radeksimko!

@jen20 jen20 merged commit 5478486 into hashicorp:master Sep 3, 2016
@radeksimko radeksimko deleted the f-aws-cloudformation-data-source branch September 4, 2016 07:05
@mwarkentin
Copy link
Contributor

@radeksimko This is awesome - I was just wondering if there's a reason the "Resources" part of the stack isn't available? Seems like it'd be useful:

I suppose that's potentially more dynamic than the rest of the stack?

@radeksimko
Copy link
Member Author

@mwarkentin I can't think of a particular reason, as long as it's available via the API/SDK it makes sense to expose it. PRs welcomed. 😉

@mwarkentin
Copy link
Contributor

@radeksimko Thanks - looks like they are: http://docs.aws.amazon.com/sdk-for-go/api/service/cloudformation/#example_CloudFormation_ListStackResources

Will open a separate issue - not sure if this is something I'd be able to tackle at this point (very golang noob), but could be a good learning experience. :)

@ghost
Copy link

ghost commented Apr 22, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants