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

AWS missing "pseudo" parameters #1960

Closed
rbirkby opened this issue Oct 19, 2017 · 6 comments · Fixed by #5602
Closed

AWS missing "pseudo" parameters #1960

rbirkby opened this issue Oct 19, 2017 · 6 comments · Fixed by #5602
Assignees
Labels
enhancement Requests to existing resources that expand the functionality or scope. provider Pertains to the provider itself, rather than any interaction with AWS.
Milestone

Comments

@rbirkby
Copy link
Contributor

rbirkby commented Oct 19, 2017

Terraform v0.10.7

data_source_aws_partition.go implements the aws "partition" pseudo parameters. However, other pseudo parameters are missing. For example, URLSuffix - which is correlated to the partition - is not available within terraform.

For details of this and other pseudo parameters, see the CloudFormation documentation

@radeksimko radeksimko added the enhancement Requests to existing resources that expand the functionality or scope. label Oct 23, 2017
@bflad bflad added the provider Pertains to the provider itself, rather than any interaction with AWS. label Jan 29, 2018
@lorengordon
Copy link
Contributor

There are already data sources to get the partition, the current region, and the account ID. URL Suffix is missing. The remaining pseudo parameters appear to be related specifically to CloudFormation and the stack in question.

I can take a stab at implementing an equivalent of URLSuffix. Would it be preferable as a new data source, or a new attribute of data_source_aws_partition?

@lorengordon
Copy link
Contributor

Heh, so, slightly annoying. I'm not finding an API call that returns the URL Suffix. And CloudFormation isn't open source, so can't really see how they do it. Can maybe parse it out of an endpoint, but which endpoint?

Looking at the other related data sources for inspiration...

  • data_source_aws_partition gets the partition from the AWSClient struct, which is setup in config.go, where a few different methods are used to determine the partition
  • data_source_aws_caller_identity gets the account_id from an API call to sts.GetCallerIdentity() (even though accountid is an attribute in the AWSClient struct? odd...)
  • data_source_aws_region gets the current region from the AWSClient struct, which gets it from the Config struct, which gets it from the provider

@lorengordon
Copy link
Contributor

Alright, got a first stab done, see #5602.

@bflad
Copy link
Contributor

bflad commented Aug 7, 2019

Support for a new dns_suffix attribute in the aws_partition data source has been merged and will release with version 2.23.0 of the Terraform AWS Provider in the next day or two. Thanks to @lorengordon for the implementation. 👍

@bflad bflad added this to the v2.23.0 milestone Aug 7, 2019
@ghost
Copy link

ghost commented Aug 7, 2019

This has been released in version 2.23.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Nov 2, 2019

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. provider Pertains to the provider itself, rather than any interaction with AWS.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants