Skip to content

Commit

Permalink
Rename resources from hcp_transit_gateway_attachment to hcp_aws_trans…
Browse files Browse the repository at this point in the history
…it_gateway_attachment
  • Loading branch information
roaks3 committed Feb 8, 2021
1 parent 4959c4b commit 7dd4fa5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions internal/provider/data_source_transit_gateway_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"github.com/hashicorp/terraform-provider-hcp/internal/clients"
)

func dataSourceTransitGatewayAttachment() *schema.Resource {
func dataSourceAwsTransitGatewayAttachment() *schema.Resource {
return &schema.Resource{
Description: "??????",
ReadContext: dataSourceTransitGatewayAttachmentRead,
ReadContext: dataSourceAwsTransitGatewayAttachmentRead,
Timeouts: &schema.ResourceTimeout{
Default: &tgwDefaultTimeout,
},
Expand Down Expand Up @@ -81,7 +81,7 @@ func dataSourceTransitGatewayAttachment() *schema.Resource {
}
}

func dataSourceTransitGatewayAttachmentRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
func dataSourceAwsTransitGatewayAttachmentRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
client := meta.(*clients.Client)

hvnID := d.Get("hvn_id").(string)
Expand Down
14 changes: 7 additions & 7 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ func New() func() *schema.Provider {
p := &schema.Provider{
DataSourcesMap: map[string]*schema.Resource{
"hcp_aws_network_peering": dataSourceAwsNetworkPeering(),
"hcp_aws_transit_gateway_attachment": dataSourceAwsTransitGatewayAttachment(),
"hcp_consul_agent_helm_config": dataSourceConsulAgentHelmConfig(),
"hcp_consul_agent_kubernetes_secret": dataSourceConsulAgentKubernetesSecret(),
"hcp_consul_cluster": dataSourceConsulCluster(),
"hcp_hvn": dataSourceHvn(),
"hcp_transit_gateway_attachment": dataSourceTransitGatewayAttachment(),
},
ResourcesMap: map[string]*schema.Resource{
"hcp_aws_network_peering": resourceAwsNetworkPeering(),
"hcp_consul_cluster": resourceConsulCluster(),
"hcp_consul_cluster_root_token": resourceConsulClusterRootToken(),
"hcp_consul_snapshot": resourceConsulSnapshot(),
"hcp_hvn": resourceHvn(),
"hcp_transit_gateway_attachment": resourceTransitGatewayAttachment(),
"hcp_aws_network_peering": resourceAwsNetworkPeering(),
"hcp_aws_transit_gateway_attachment": resourceAwsTransitGatewayAttachment(),
"hcp_consul_cluster": resourceConsulCluster(),
"hcp_consul_cluster_root_token": resourceConsulClusterRootToken(),
"hcp_consul_snapshot": resourceConsulSnapshot(),
"hcp_hvn": resourceHvn(),
},
Schema: map[string]*schema.Schema{
"client_id": {
Expand Down
14 changes: 7 additions & 7 deletions internal/provider/resource_transit_gateway_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ var tgwDefaultTimeout = time.Minute * 1
var tgwCreateTimeout = time.Minute * 35
var tgwDeleteTimeout = time.Minute * 35

func resourceTransitGatewayAttachment() *schema.Resource {
func resourceAwsTransitGatewayAttachment() *schema.Resource {
return &schema.Resource{
Description: "???",

CreateContext: resourceTransitGatewayAttachmentCreate,
ReadContext: resourceTransitGatewayAttachmentRead,
DeleteContext: resourceTransitGatewayAttachmentDelete,
CreateContext: resourceAwsTransitGatewayAttachmentCreate,
ReadContext: resourceAwsTransitGatewayAttachmentRead,
DeleteContext: resourceAwsTransitGatewayAttachmentDelete,
Timeouts: &schema.ResourceTimeout{
Default: &tgwDefaultTimeout,
Create: &tgwCreateTimeout,
Expand Down Expand Up @@ -106,7 +106,7 @@ func resourceTransitGatewayAttachment() *schema.Resource {
}
}

func resourceTransitGatewayAttachmentCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
func resourceAwsTransitGatewayAttachmentCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
client := meta.(*clients.Client)

hvnID := d.Get("hvn_id").(string)
Expand Down Expand Up @@ -210,7 +210,7 @@ func resourceTransitGatewayAttachmentCreate(ctx context.Context, d *schema.Resou
return nil
}

func resourceTransitGatewayAttachmentRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
func resourceAwsTransitGatewayAttachmentRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
client := meta.(*clients.Client)

link, err := buildLinkFromURL(d.Id(), TgwAttachmentResourceType, client.Config.OrganizationID)
Expand Down Expand Up @@ -242,7 +242,7 @@ func resourceTransitGatewayAttachmentRead(ctx context.Context, d *schema.Resourc
return nil
}

func resourceTransitGatewayAttachmentDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
func resourceAwsTransitGatewayAttachmentDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
client := meta.(*clients.Client)

link, err := buildLinkFromURL(d.Id(), TgwAttachmentResourceType, client.Config.OrganizationID)
Expand Down

0 comments on commit 7dd4fa5

Please sign in to comment.