Skip to content

Commit

Permalink
rename resource "accepter"
Browse files Browse the repository at this point in the history
  • Loading branch information
drewmullen committed Aug 11, 2022
1 parent 0c3cd95 commit 4d5fe8b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .changelog/26227.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ aws_networkmanager_vpc_attachment
```

```release-note:new-resource
aws_networkmanager_attachment_acceptor
aws_networkmanager_attachment_accepter
```
2 changes: 1 addition & 1 deletion internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ func New(_ context.Context) (*schema.Provider, error) {
"aws_networkfirewall_resource_policy": networkfirewall.ResourceResourcePolicy(),
"aws_networkfirewall_rule_group": networkfirewall.ResourceRuleGroup(),

"aws_networkmanager_attachment_acceptor": networkmanager.ResourceAttachmentAcceptor(),
"aws_networkmanager_attachment_accepter": networkmanager.ResourceAttachmentAccepter(),
"aws_networkmanager_connection": networkmanager.ResourceConnection(),
"aws_networkmanager_customer_gateway_association": networkmanager.ResourceCustomerGatewayAssociation(),
"aws_networkmanager_device": networkmanager.ResourceDevice(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ import (
"github.com/hashicorp/terraform-provider-aws/internal/conns"
)

// AttachmentAcceptor is not specific to AttachmentType. However, querying attachments for status updates is
// AttachmentAccepter is not specific to AttachmentType. However, querying attachments for status updates is
// To facilitate querying and waiters on specific attachment types, attachment_type required

func ResourceAttachmentAcceptor() *schema.Resource {
func ResourceAttachmentAccepter() *schema.Resource {
return &schema.Resource{
CreateWithoutTimeout: ResourceAttachmentAcceptorCreate,
CreateWithoutTimeout: ResourceAttachmentAccepterCreate,
ReadWithoutTimeout: schema.NoopContext,
DeleteWithoutTimeout: ResourceAttachmentAcceptorDelete,
DeleteWithoutTimeout: ResourceAttachmentAccepterDelete,

Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(10 * time.Minute),
Expand Down Expand Up @@ -87,7 +87,7 @@ func ResourceAttachmentAcceptor() *schema.Resource {
}
}

func ResourceAttachmentAcceptorCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
func ResourceAttachmentAccepterCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
conn := meta.(*conns.AWSClient).NetworkManagerConn

attachmentId := d.Get("attachment_id").(string)
Expand Down Expand Up @@ -148,7 +148,7 @@ func ResourceAttachmentAcceptorCreate(ctx context.Context, d *schema.ResourceDat
return nil
}

func ResourceAttachmentAcceptorDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
func ResourceAttachmentAccepterDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
log.Printf("[WARN] Attachment (%s) not deleted, removing from state.", d.Id())

return nil
Expand Down
12 changes: 6 additions & 6 deletions internal/service/networkmanager/attachment_acceptor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
tfnetworkmanager "github.com/hashicorp/terraform-provider-aws/internal/service/networkmanager"
)

// This test file serves as tests for aws_networkmanager_attachment_acceptor and the following attachment types
// This test file serves as tests for aws_networkmanager_attachment_accepter and the following attachment types
// aws_networkmanager_vpc_attachment
func TestAccNetworkManagerAttachmentAcceptor_vpcAttachmentBasic(t *testing.T) {
func TestAccNetworkManagerAttachmentAccepter_vpcAttachmentBasic(t *testing.T) {
resourceName := "aws_networkmanager_vpc_attachment.test"
testExternalProviders := map[string]resource.ExternalProvider{
"awscc": {
Expand Down Expand Up @@ -70,7 +70,7 @@ func TestAccNetworkManagerAttachmentAcceptor_vpcAttachmentBasic(t *testing.T) {
})
}

func TestAccNetworkManagerAttachmentAcceptor_vpcAttachmentTags(t *testing.T) {
func TestAccNetworkManagerAttachmentAccepter_vpcAttachmentTags(t *testing.T) {
resourceName := "aws_networkmanager_vpc_attachment.test"
testExternalProviders := map[string]resource.ExternalProvider{
"awscc": {
Expand Down Expand Up @@ -233,7 +233,7 @@ resource "aws_networkmanager_vpc_attachment" "test" {
}
}
resource "aws_networkmanager_attachment_acceptor" "test" {
resource "aws_networkmanager_attachment_accepter" "test" {
attachment_id = aws_networkmanager_vpc_attachment.test.id
attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type
}
Expand All @@ -257,7 +257,7 @@ resource "aws_networkmanager_vpc_attachment" "test" {
}
}
resource "aws_networkmanager_attachment_acceptor" "test" {
resource "aws_networkmanager_attachment_accepter" "test" {
attachment_id = aws_networkmanager_vpc_attachment.test.id
attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type
}
Expand All @@ -282,7 +282,7 @@ resource "aws_networkmanager_vpc_attachment" "test" {
}
}
resource "aws_networkmanager_attachment_acceptor" "test" {
resource "aws_networkmanager_attachment_accepter" "test" {
attachment_id = aws_networkmanager_vpc_attachment.test.id
attachment_type = aws_networkmanager_vpc_attachment.test.attachment_type
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
subcategory: "Network Manager"
layout: "aws"
page_title: "AWS: aws_networkmanager_attachment_acceptor"
page_title: "AWS: aws_networkmanager_attachment_accepter"
description: |-
Terraform resource for managing an AWS NetworkManager VpcAttachment.
---

# Resource: aws_networkmanager_attachment_acceptor
# Resource: aws_networkmanager_attachment_accepter

Terraform resource for managing an AWS NetworkManager Attachment Acceptor.
Terraform resource for managing an AWS NetworkManager Attachment Accepter.

## Example Usage

### Basic Usage

```terraform
resource "aws_networkmanager_attachment_acceptor" "test" {
resource "aws_networkmanager_attachment_accepter" "test" {
attachment_id = aws_networkmanager_vpc_attachment.vpc.id
attachment_type = aws_networkmanager_vpc_attachment.vpc.attachment_type
}
Expand Down

0 comments on commit 4d5fe8b

Please sign in to comment.