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

Add VPC attachment resource #1464

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

annakhm
Copy link
Collaborator

@annakhm annakhm commented Nov 10, 2024

This is the new way of attaching connectivity profile to vpc, hence the profile attribute is also removed from vpc resource

@annakhm
Copy link
Collaborator Author

annakhm commented Nov 10, 2024

--- PASS: TestAccResourceNsxtVpc_basic (72.41s)
--- PASS: TestAccResourceNsxtVpc_importBasic (28.18s)

Copy link
Collaborator

@ksamoray ksamoray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

nsxt/provider.go Outdated
Comment on lines 530 to 533
"nsxt_vpc_dhcp_v4_static_binding": resourceNsxtVpcSubnetDhcpV4StaticBindingConfig(),
"nsxt_vpc_attachment": resourceNsxtVpcAttachment(),
},

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest this be the first in the lists of nsxt_vpc_* items (as well as ensure all listed resources and data sources are listed alphabetically.)


id := d.Id()
if id == "" {
return fmt.Errorf("Error obtaining VpcAttachment ID")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return fmt.Errorf("Error obtaining VpcAttachment ID")
return fmt.Errorf("error obtaining VpcAttachment ID")


id := d.Id()
if id == "" {
return fmt.Errorf("Error obtaining VpcAttachment ID")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return fmt.Errorf("Error obtaining VpcAttachment ID")
return fmt.Errorf("error obtaining VpcAttachment ID")

func resourceNsxtVpcAttachmentDelete(d *schema.ResourceData, m interface{}) error {
id := d.Id()
if id == "" {
return fmt.Errorf("Error obtaining VpcAttachment ID")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return fmt.Errorf("Error obtaining VpcAttachment ID")
return fmt.Errorf("error obtaining VpcAttachment ID")

This is the new way of attaching connectivity profile to vpc,
hence the profile attribute is also removed from vpc resource

Signed-off-by: Anna Khmelnitsky <[email protected]>
Copy link
Member

@salv-orlando salv-orlando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@annakhm annakhm merged commit 8aa682d into vpc20-feature-branch Nov 12, 2024
3 checks passed
@annakhm annakhm deleted the vpc-attachment-resource branch November 12, 2024 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants