Skip to content

Commit ac3b427

Browse files
committed
chore(cloudamqp_integration_aws_eventbridge): Migrate towards terraform plugin framework
This is the first resource to move towards the new system and should serve as a template for all others. The reason to choose this one as the first is because it is the smallest file that still has tests to prove everything still works as before.
1 parent c1a4d78 commit ac3b427

File tree

2 files changed

+204
-118
lines changed

2 files changed

+204
-118
lines changed

cloudamqp/provider.go

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ func (p *cloudamqpProvider) DataSources(_ context.Context) []func() datasource.D
9999
}
100100

101101
func (p *cloudamqpProvider) Resources(_ context.Context) []func() resource.Resource {
102-
return []func() resource.Resource{}
102+
return []func() resource.Resource{
103+
func() resource.Resource {
104+
return &awsEventBridgeResource{}
105+
},
106+
}
103107
}
104108

105109
func New(version string, client *http.Client) provider.Provider {
@@ -145,29 +149,28 @@ func Provider(v string, client *http.Client) *schemaSdk.Provider {
145149
"cloudamqp_vpc_info": dataSourceVpcInfo(),
146150
},
147151
ResourcesMap: map[string]*schemaSdk.Resource{
148-
"cloudamqp_account_action": resourceAccountAction(),
149-
"cloudamqp_alarm": resourceAlarm(),
150-
"cloudamqp_custom_domain": resourceCustomDomain(),
151-
"cloudamqp_extra_disk_size": resourceExtraDiskSize(),
152-
"cloudamqp_instance": resourceInstance(),
153-
"cloudamqp_integration_aws_eventbridge": resourceAwsEventBridge(),
154-
"cloudamqp_integration_log": resourceIntegrationLog(),
155-
"cloudamqp_integration_metric": resourceIntegrationMetric(),
156-
"cloudamqp_node_actions": resourceNodeAction(),
157-
"cloudamqp_notification": resourceNotification(),
158-
"cloudamqp_plugin_community": resourcePluginCommunity(),
159-
"cloudamqp_plugin": resourcePlugin(),
160-
"cloudamqp_privatelink_aws": resourcePrivateLinkAws(),
161-
"cloudamqp_privatelink_azure": resourcePrivateLinkAzure(),
162-
"cloudamqp_rabbitmq_configuration": resourceRabbitMqConfiguration(),
163-
"cloudamqp_security_firewall": resourceSecurityFirewall(),
164-
"cloudamqp_upgrade_rabbitmq": resourceUpgradeRabbitMQ(),
165-
"cloudamqp_upgrade_lavinmq": resourceUpgradeLavinMQ(),
166-
"cloudamqp_vpc_connect": resourceVpcConnect(),
167-
"cloudamqp_vpc_gcp_peering": resourceVpcGcpPeering(),
168-
"cloudamqp_vpc_peering": resourceVpcPeering(),
169-
"cloudamqp_vpc": resourceVpc(),
170-
"cloudamqp_webhook": resourceWebhook(),
152+
"cloudamqp_account_action": resourceAccountAction(),
153+
"cloudamqp_alarm": resourceAlarm(),
154+
"cloudamqp_custom_domain": resourceCustomDomain(),
155+
"cloudamqp_extra_disk_size": resourceExtraDiskSize(),
156+
"cloudamqp_instance": resourceInstance(),
157+
"cloudamqp_integration_log": resourceIntegrationLog(),
158+
"cloudamqp_integration_metric": resourceIntegrationMetric(),
159+
"cloudamqp_node_actions": resourceNodeAction(),
160+
"cloudamqp_notification": resourceNotification(),
161+
"cloudamqp_plugin_community": resourcePluginCommunity(),
162+
"cloudamqp_plugin": resourcePlugin(),
163+
"cloudamqp_privatelink_aws": resourcePrivateLinkAws(),
164+
"cloudamqp_privatelink_azure": resourcePrivateLinkAzure(),
165+
"cloudamqp_rabbitmq_configuration": resourceRabbitMqConfiguration(),
166+
"cloudamqp_security_firewall": resourceSecurityFirewall(),
167+
"cloudamqp_upgrade_rabbitmq": resourceUpgradeRabbitMQ(),
168+
"cloudamqp_upgrade_lavinmq": resourceUpgradeLavinMQ(),
169+
"cloudamqp_vpc_connect": resourceVpcConnect(),
170+
"cloudamqp_vpc_gcp_peering": resourceVpcGcpPeering(),
171+
"cloudamqp_vpc_peering": resourceVpcPeering(),
172+
"cloudamqp_vpc": resourceVpc(),
173+
"cloudamqp_webhook": resourceWebhook(),
171174
},
172175
ConfigureFunc: configureClient(client),
173176
}

0 commit comments

Comments
 (0)