-
Notifications
You must be signed in to change notification settings - Fork 50
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
HCPE-830 - Add TGW attachment resource #58
Conversation
7dd4fa5
to
ab742b7
Compare
@@ -0,0 +1,51 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs/*
files included here were generated with go generate
, which pulls in the examples and resource/field descriptions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had some questions and a suggestion for the new provider_account_id
HVN output, but otherwise nice work! ✨
@@ -89,6 +89,11 @@ func resourceHvn() *schema.Resource { | |||
Type: schema.TypeString, | |||
Computed: true, | |||
}, | |||
"provider_account_id": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's save this for a follow-up, but I think this is a good point to introduce the pattern for returning cloud-specific outputs. I'm thinking we'll have an output with the top-level name aws
, which contains account_id
, similar to this vpc_config object in the the AWS provider's eks_cluster resource. It's a bit of a hack, but it sounds like it's the best we've got while the provider SDK team works out a better solution for input/output objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I think this would warrant some more discussion, so my preference would be to include that in the general topic around cloud-specific values in our network resources. Definitely agree that this field falls into that category.
internal/provider/data_source_aws_transit_gateway_attachment.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments
67a5712
to
b4cb33e
Compare
Great job @roaks3, thank you for handling this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work, appreciate you taking this on!
Ticket: https://hashicorp.atlassian.net/browse/HCPE-830
Adds the
hcp_aws_transit_gateway_attachment
resource and data source. The implementation is largely pulled from the initial implementation: https://github.com/hashicorp/cloud-terraform-provider-hcp-internal/pull/8The inclusion of
aws
in the resource name came from some discussion captured here, which might change moving forward.A simple example of what the resource looks like:
To Test
The example included here can be used to test the functionality of this resource. Note that the AWS config cannot be the same account as the HVN.