Skip to content

Commit b5032c4

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 42224e1 commit b5032c4

File tree

2 files changed

+205
-122
lines changed

2 files changed

+205
-122
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 {
@@ -146,30 +150,29 @@ func Provider(v string, client *http.Client) *schemaSdk.Provider {
146150
"cloudamqp_vpc_info": dataSourceVpcInfo(),
147151
},
148152
ResourcesMap: map[string]*schemaSdk.Resource{
149-
"cloudamqp_account_action": resourceAccountAction(),
150-
"cloudamqp_alarm": resourceAlarm(),
151-
"cloudamqp_custom_domain": resourceCustomDomain(),
152-
"cloudamqp_extra_disk_size": resourceExtraDiskSize(),
153-
"cloudamqp_instance": resourceInstance(),
154-
"cloudamqp_integration_aws_eventbridge": resourceAwsEventBridge(),
155-
"cloudamqp_integration_log": resourceIntegrationLog(),
156-
"cloudamqp_integration_metric": resourceIntegrationMetric(),
153+
"cloudamqp_account_action": resourceAccountAction(),
154+
"cloudamqp_alarm": resourceAlarm(),
155+
"cloudamqp_custom_domain": resourceCustomDomain(),
156+
"cloudamqp_extra_disk_size": resourceExtraDiskSize(),
157+
"cloudamqp_instance": resourceInstance(),
158+
"cloudamqp_integration_log": resourceIntegrationLog(),
159+
"cloudamqp_integration_metric": resourceIntegrationMetric(),
157160
"cloudamqp_maintenance_window": resourceMaintenanceWindow(),
158-
"cloudamqp_node_actions": resourceNodeAction(),
159-
"cloudamqp_notification": resourceNotification(),
160-
"cloudamqp_plugin_community": resourcePluginCommunity(),
161-
"cloudamqp_plugin": resourcePlugin(),
162-
"cloudamqp_privatelink_aws": resourcePrivateLinkAws(),
163-
"cloudamqp_privatelink_azure": resourcePrivateLinkAzure(),
164-
"cloudamqp_rabbitmq_configuration": resourceRabbitMqConfiguration(),
165-
"cloudamqp_security_firewall": resourceSecurityFirewall(),
166-
"cloudamqp_upgrade_rabbitmq": resourceUpgradeRabbitMQ(),
167-
"cloudamqp_upgrade_lavinmq": resourceUpgradeLavinMQ(),
168-
"cloudamqp_vpc_connect": resourceVpcConnect(),
169-
"cloudamqp_vpc_gcp_peering": resourceVpcGcpPeering(),
170-
"cloudamqp_vpc_peering": resourceVpcPeering(),
171-
"cloudamqp_vpc": resourceVpc(),
172-
"cloudamqp_webhook": resourceWebhook(),
161+
"cloudamqp_node_actions": resourceNodeAction(),
162+
"cloudamqp_notification": resourceNotification(),
163+
"cloudamqp_plugin_community": resourcePluginCommunity(),
164+
"cloudamqp_plugin": resourcePlugin(),
165+
"cloudamqp_privatelink_aws": resourcePrivateLinkAws(),
166+
"cloudamqp_privatelink_azure": resourcePrivateLinkAzure(),
167+
"cloudamqp_rabbitmq_configuration": resourceRabbitMqConfiguration(),
168+
"cloudamqp_security_firewall": resourceSecurityFirewall(),
169+
"cloudamqp_upgrade_rabbitmq": resourceUpgradeRabbitMQ(),
170+
"cloudamqp_upgrade_lavinmq": resourceUpgradeLavinMQ(),
171+
"cloudamqp_vpc_connect": resourceVpcConnect(),
172+
"cloudamqp_vpc_gcp_peering": resourceVpcGcpPeering(),
173+
"cloudamqp_vpc_peering": resourceVpcPeering(),
174+
"cloudamqp_vpc": resourceVpc(),
175+
"cloudamqp_webhook": resourceWebhook(),
173176
},
174177
ConfigureFunc: configureClient(client),
175178
}

0 commit comments

Comments
 (0)