diff --git a/outscale/data_source_outscale_api_access_policy.go b/outscale/data_source_outscale_api_access_policy.go index 0144661b0..c2da9516b 100644 --- a/outscale/data_source_outscale_api_access_policy.go +++ b/outscale/data_source_outscale_api_access_policy.go @@ -11,9 +11,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPIApiAccessPolicy() *schema.Resource { +func DataSourceOutscaleApiAccessPolicy() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIApiAccessPolicyRead, + Read: DataSourceOutscaleApiAccessPolicyRead, Schema: map[string]*schema.Schema{ "max_access_key_expiration_seconds": { Type: schema.TypeInt, @@ -31,7 +31,7 @@ func dataSourceOutscaleOAPIApiAccessPolicy() *schema.Resource { } } -func dataSourceOutscaleOAPIApiAccessPolicyRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleApiAccessPolicyRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadApiAccessPolicyRequest{} diff --git a/outscale/data_source_outscale_api_access_rule.go b/outscale/data_source_outscale_api_access_rule.go index 91bd8c84c..5bcbd5137 100644 --- a/outscale/data_source_outscale_api_access_rule.go +++ b/outscale/data_source_outscale_api_access_rule.go @@ -12,9 +12,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPIApiAccessRule() *schema.Resource { +func DataSourceOutscaleApiAccessRule() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIApiAccessRuleRead, + Read: DataSourceOutscaleApiAccessRuleRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), "api_access_rule_id": { @@ -48,7 +48,7 @@ func dataSourceOutscaleOAPIApiAccessRule() *schema.Resource { } } -func dataSourceOutscaleOAPIApiAccessRuleRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleApiAccessRuleRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_api_access_rules.go b/outscale/data_source_outscale_api_access_rules.go index 7e834a66e..3fc9dd6bd 100644 --- a/outscale/data_source_outscale_api_access_rules.go +++ b/outscale/data_source_outscale_api_access_rules.go @@ -11,9 +11,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPIApiAccessRules() *schema.Resource { +func DataSourceOutscaleApiAccessRules() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIApiAccessRulesRead, + Read: DataSourceOutscaleApiAccessRulesRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), "api_access_rules": { @@ -55,7 +55,7 @@ func dataSourceOutscaleOAPIApiAccessRules() *schema.Resource { } } -func dataSourceOutscaleOAPIApiAccessRulesRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleApiAccessRulesRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_ca.go b/outscale/data_source_outscale_ca.go index 219eb24ff..6f5da8872 100644 --- a/outscale/data_source_outscale_ca.go +++ b/outscale/data_source_outscale_ca.go @@ -12,9 +12,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPICa() *schema.Resource { +func DataSourceOutscaleCa() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPICaRead, + Read: DataSourceOutscaleCaRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), "ca_pem": { @@ -41,7 +41,7 @@ func dataSourceOutscaleOAPICa() *schema.Resource { } } -func dataSourceOutscaleOAPICaRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleCaRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_cas.go b/outscale/data_source_outscale_cas.go index e68714630..95d9d7fd4 100644 --- a/outscale/data_source_outscale_cas.go +++ b/outscale/data_source_outscale_cas.go @@ -11,9 +11,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPICas() *schema.Resource { +func DataSourceOutscaleCas() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPICasRead, + Read: DataSourceOutscaleCasRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), "cas": { @@ -44,7 +44,7 @@ func dataSourceOutscaleOAPICas() *schema.Resource { } } -func dataSourceOutscaleOAPICasRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleCasRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_flexible_gpu.go b/outscale/data_source_outscale_flexible_gpu.go index 5a6b41307..bb178514a 100644 --- a/outscale/data_source_outscale_flexible_gpu.go +++ b/outscale/data_source_outscale_flexible_gpu.go @@ -14,9 +14,9 @@ import ( "github.com/spf13/cast" ) -func dataSourceOutscaleOAPIFlexibleGpu() *schema.Resource { +func DataSourceOutscaleFlexibleGpu() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIFlexibleGpuRead, + Read: DataSourceOutscaleFlexibleGpuRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), "request_id": { @@ -55,7 +55,7 @@ func dataSourceOutscaleOAPIFlexibleGpu() *schema.Resource { } } -func dataSourceOutscaleOAPIFlexibleGpuRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleFlexibleGpuRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI diff --git a/outscale/data_source_outscale_flexible_gpu_catalog.go b/outscale/data_source_outscale_flexible_gpu_catalog.go index 984277574..a86913f56 100644 --- a/outscale/data_source_outscale_flexible_gpu_catalog.go +++ b/outscale/data_source_outscale_flexible_gpu_catalog.go @@ -11,9 +11,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIFlexibleGpuCatalog() *schema.Resource { +func DataSourceOutscaleFlexibleGpuCatalog() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIFlexibleGpuCatalogRead, + Read: DataSourceOutscaleFlexibleGpuCatalogRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), "flexible_gpu_catalog": { @@ -53,7 +53,7 @@ func dataSourceOutscaleOAPIFlexibleGpuCatalog() *schema.Resource { } } -func dataSourceOutscaleOAPIFlexibleGpuCatalogRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleFlexibleGpuCatalogRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadFlexibleGpuCatalogRequest{} diff --git a/outscale/data_source_outscale_flexible_gpus.go b/outscale/data_source_outscale_flexible_gpus.go index 16a957647..c4b13c53c 100644 --- a/outscale/data_source_outscale_flexible_gpus.go +++ b/outscale/data_source_outscale_flexible_gpus.go @@ -12,9 +12,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIFlexibleGpus() *schema.Resource { +func DataSourceOutscaleFlexibleGpus() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIFlexibleGpusRead, + Read: DataSourceOutscaleFlexibleGpusRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -62,7 +62,7 @@ func dataSourceOutscaleOAPIFlexibleGpus() *schema.Resource { } } -func dataSourceOutscaleOAPIFlexibleGpusRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleFlexibleGpusRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_image.go b/outscale/data_source_outscale_image.go index 72b69d8c4..72c64304a 100644 --- a/outscale/data_source_outscale_image.go +++ b/outscale/data_source_outscale_image.go @@ -12,9 +12,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIImage() *schema.Resource { +func DataSourceOutscaleImage() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIImageRead, + Read: DataSourceOutscaleImageRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -194,7 +194,7 @@ func dataSourceOutscaleOAPIImage() *schema.Resource { } } -func dataSourceOutscaleOAPIImageRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleImageRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_image_export_task.go b/outscale/data_source_outscale_image_export_task.go index d3d95c274..456159101 100644 --- a/outscale/data_source_outscale_image_export_task.go +++ b/outscale/data_source_outscale_image_export_task.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIImageExportTask() *schema.Resource { +func DataSourceOutscaleImageExportTask() *schema.Resource { return &schema.Resource{ Read: dataSourceOAPISnapshotImageTaskRead, Importer: &schema.ResourceImporter{ diff --git a/outscale/data_source_outscale_image_export_tasks.go b/outscale/data_source_outscale_image_export_tasks.go index 47b85de9d..e87d25794 100644 --- a/outscale/data_source_outscale_image_export_tasks.go +++ b/outscale/data_source_outscale_image_export_tasks.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIImageExportTasks() *schema.Resource { +func DataSourceOutscaleImageExportTasks() *schema.Resource { return &schema.Resource{ Read: dataSourceOAPIImageExportTasksRead, Importer: &schema.ResourceImporter{ diff --git a/outscale/data_source_outscale_images.go b/outscale/data_source_outscale_images.go index a4855e22d..2ceda23c3 100644 --- a/outscale/data_source_outscale_images.go +++ b/outscale/data_source_outscale_images.go @@ -14,9 +14,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPIImages() *schema.Resource { +func DataSourceOutscaleImages() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIImagesRead, + Read: DataSourceOutscaleImagesRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -211,7 +211,7 @@ func dataSourceOutscaleOAPIImages() *schema.Resource { } } -func dataSourceOutscaleOAPIImagesRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleImagesRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI executableUsers, executableUsersOk := d.GetOk("permissions") diff --git a/outscale/data_source_outscale_load_balancer.go b/outscale/data_source_outscale_load_balancer.go index 92155d0b5..adae4ae3d 100644 --- a/outscale/data_source_outscale_load_balancer.go +++ b/outscale/data_source_outscale_load_balancer.go @@ -188,9 +188,9 @@ func getDataSourceSchemas(attrsSchema map[string]*schema.Schema) map[string]*sch } -func dataSourceOutscaleOAPILoadBalancer() *schema.Resource { +func DataSourceOutscaleLoadBalancer() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPILoadBalancerRead, + Read: DataSourceOutscaleLoadBalancerRead, Schema: getDataSourceSchemas(attrLBchema()), } } @@ -281,7 +281,7 @@ func readLbs0(conn *oscgo.APIClient, d *schema.ResourceData) (*oscgo.LoadBalance return &lbs[0], resp, nil } -func dataSourceOutscaleOAPILoadBalancerRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleLoadBalancerRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI lb, _, err := readLbs0(conn, d) diff --git a/outscale/data_source_outscale_load_balancer_listener_rule.go b/outscale/data_source_outscale_load_balancer_listener_rule.go index 4e7fbcb48..390a7a10c 100644 --- a/outscale/data_source_outscale_load_balancer_listener_rule.go +++ b/outscale/data_source_outscale_load_balancer_listener_rule.go @@ -56,14 +56,14 @@ func attrLBListenerRule() map[string]*schema.Schema { } } -func dataSourceOutscaleOAPILoadBalancerLDRule() *schema.Resource { +func DataSourceOutscaleLoadBalancerLDRule() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPILoadBalancerLDRuleRead, + Read: DataSourceOutscaleLoadBalancerLDRuleRead, Schema: getDataSourceSchemas(attrLBListenerRule()), } } -func dataSourceOutscaleOAPILoadBalancerLDRuleRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleLoadBalancerLDRuleRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI lrNamei, nameOk := d.GetOk("listener_rule_name") diff --git a/outscale/data_source_outscale_load_balancer_listener_rules.go b/outscale/data_source_outscale_load_balancer_listener_rules.go index 98e2adbdf..144c26f3f 100644 --- a/outscale/data_source_outscale_load_balancer_listener_rules.go +++ b/outscale/data_source_outscale_load_balancer_listener_rules.go @@ -64,14 +64,14 @@ func attrLBListenerRules() map[string]*schema.Schema { } } -func dataSourceOutscaleOAPILoadBalancerLDRules() *schema.Resource { +func DataSourceOutscaleLoadBalancerLDRules() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPILoadBalancerLDRulesRead, + Read: DataSourceOutscaleLoadBalancerLDRulesRead, Schema: getDataSourceSchemas(attrLBListenerRules()), } } -func dataSourceOutscaleOAPILoadBalancerLDRulesRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleLoadBalancerLDRulesRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI lrNamei, nameOk := d.GetOk("listener_rule_name") diff --git a/outscale/data_source_outscale_load_balancer_tags.go b/outscale/data_source_outscale_load_balancer_tags.go index 3e9fcd869..2f9d20b92 100644 --- a/outscale/data_source_outscale_load_balancer_tags.go +++ b/outscale/data_source_outscale_load_balancer_tags.go @@ -12,15 +12,15 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPILBUTags() *schema.Resource { +func DataSourceOutscaleLBUTags() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPILBUTagsRead, + Read: DataSourceOutscaleLBUTagsRead, Schema: getDataSourceSchemas(getDSOAPILBUTagsSchema()), } } -func dataSourceOutscaleOAPILBUTagsRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleLBUTagsRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI ename, nameOk := d.GetOk("load_balancer_names") diff --git a/outscale/data_source_outscale_load_balancers.go b/outscale/data_source_outscale_load_balancers.go index f91d222b4..c1be2dbe3 100644 --- a/outscale/data_source_outscale_load_balancers.go +++ b/outscale/data_source_outscale_load_balancers.go @@ -191,15 +191,15 @@ func attrLBSchema() map[string]*schema.Schema { } } -func dataSourceOutscaleOAPILoadBalancers() *schema.Resource { +func DataSourceOutscaleLoadBalancers() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPILoadBalancersRead, + Read: DataSourceOutscaleLoadBalancersRead, Schema: getDataSourceSchemas(attrLBSchema()), } } -func dataSourceOutscaleOAPILoadBalancersRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleLoadBalancersRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI resp, _, err := readLbs_(conn, d, schema.TypeList) diff --git a/outscale/data_source_outscale_nat_service.go b/outscale/data_source_outscale_nat_service.go index 30c19a6aa..664fd4b72 100644 --- a/outscale/data_source_outscale_nat_service.go +++ b/outscale/data_source_outscale_nat_service.go @@ -13,9 +13,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPINatService() *schema.Resource { +func DataSourceOutscaleNatService() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPINatServiceRead, + Read: DataSourceOutscaleNatServiceRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -61,7 +61,7 @@ func dataSourceOutscaleOAPINatService() *schema.Resource { } } -func dataSourceOutscaleOAPINatServiceRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleNatServiceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_nat_services.go b/outscale/data_source_outscale_nat_services.go index 547f481af..323faac10 100644 --- a/outscale/data_source_outscale_nat_services.go +++ b/outscale/data_source_outscale_nat_services.go @@ -12,9 +12,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPINatServices() *schema.Resource { +func DataSourceOutscaleNatServices() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPINatServicesRead, + Read: DataSourceOutscaleNatServicesRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -74,7 +74,7 @@ func dataSourceOutscaleOAPINatServices() *schema.Resource { } } -func dataSourceOutscaleOAPINatServicesRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleNatServicesRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_net.go b/outscale/data_source_outscale_net.go index 2106bd439..364ef7e56 100644 --- a/outscale/data_source_outscale_net.go +++ b/outscale/data_source_outscale_net.go @@ -13,9 +13,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIVpc() *schema.Resource { +func DataSourceOutscaleVpc() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIVpcRead, + Read: DataSourceOutscaleVpcRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -54,7 +54,7 @@ func dataSourceOutscaleOAPIVpc() *schema.Resource { } } -func dataSourceOutscaleOAPIVpcRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleVpcRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadNetsRequest{} diff --git a/outscale/data_source_outscale_net_access_point_services.go b/outscale/data_source_outscale_net_access_point_services.go index 47e1faf0f..b1925bb1b 100644 --- a/outscale/data_source_outscale_net_access_point_services.go +++ b/outscale/data_source_outscale_net_access_point_services.go @@ -12,9 +12,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPINetAccessPointServices() *schema.Resource { +func DataSourceOutscaleNetAccessPointServices() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPINetAccessPointServicesRead, + Read: DataSourceOutscaleNetAccessPointServicesRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), "services": { @@ -46,7 +46,7 @@ func dataSourceOutscaleOAPINetAccessPointServices() *schema.Resource { } } -func dataSourceOutscaleOAPINetAccessPointServicesRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleNetAccessPointServicesRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_net_attributes.go b/outscale/data_source_outscale_net_attributes.go index 0853056f0..1f33d4c5f 100644 --- a/outscale/data_source_outscale_net_attributes.go +++ b/outscale/data_source_outscale_net_attributes.go @@ -13,9 +13,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIVpcAttr() *schema.Resource { +func DataSourceOutscaleVpcAttr() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIVpcAttrRead, + Read: DataSourceOutscaleVpcAttrRead, Schema: map[string]*schema.Schema{ //"filter": dataSourceFiltersSchema(), @@ -48,7 +48,7 @@ func dataSourceOutscaleOAPIVpcAttr() *schema.Resource { } } -func dataSourceOutscaleOAPIVpcAttrRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleVpcAttrRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters := oscgo.FiltersNet{ diff --git a/outscale/data_source_outscale_net_peering.go b/outscale/data_source_outscale_net_peering.go index d0428dea2..ad62c35fa 100644 --- a/outscale/data_source_outscale_net_peering.go +++ b/outscale/data_source_outscale_net_peering.go @@ -15,9 +15,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPILinPeeringConnection() *schema.Resource { +func DataSourceOutscaleLinPeeringConnection() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPILinPeeringConnectionRead, + Read: DataSourceOutscaleLinPeeringConnectionRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -52,7 +52,7 @@ func dataSourceOutscaleOAPILinPeeringConnection() *schema.Resource { } } -func dataSourceOutscaleOAPILinPeeringConnectionRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleLinPeeringConnectionRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI log.Printf("[DEBUG] Reading Net Peering Connections.") diff --git a/outscale/data_source_outscale_net_peerings.go b/outscale/data_source_outscale_net_peerings.go index 595c2bc97..d70ba8355 100644 --- a/outscale/data_source_outscale_net_peerings.go +++ b/outscale/data_source_outscale_net_peerings.go @@ -14,9 +14,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPILinPeeringsConnection() *schema.Resource { +func DataSourceOutscaleLinPeeringsConnection() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPILinPeeringsConnectionRead, + Read: DataSourceOutscaleLinPeeringsConnectionRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -59,7 +59,7 @@ func dataSourceOutscaleOAPILinPeeringsConnection() *schema.Resource { } } -func dataSourceOutscaleOAPILinPeeringsConnectionRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleLinPeeringsConnectionRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI log.Printf("[DEBUG] Reading VPC Peering Connections.") diff --git a/outscale/data_source_outscale_nets.go b/outscale/data_source_outscale_nets.go index 41a0f5e32..706c57ae8 100644 --- a/outscale/data_source_outscale_nets.go +++ b/outscale/data_source_outscale_nets.go @@ -12,9 +12,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIVpcs() *schema.Resource { +func DataSourceOutscaleVpcs() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIVpcsRead, + Read: DataSourceOutscaleVpcsRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -64,7 +64,7 @@ func dataSourceOutscaleOAPIVpcs() *schema.Resource { } } -func dataSourceOutscaleOAPIVpcsRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleVpcsRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadNetsRequest{} diff --git a/outscale/data_source_outscale_nic.go b/outscale/data_source_outscale_nic.go index 3a0853d94..dad0afc36 100644 --- a/outscale/data_source_outscale_nic.go +++ b/outscale/data_source_outscale_nic.go @@ -17,9 +17,9 @@ import ( ) // Creates a network interface in the specified subnet -func dataSourceOutscaleOAPINic() *schema.Resource { +func DataSourceOutscaleNic() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPINicRead, + Read: DataSourceOutscaleNicRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -213,7 +213,7 @@ func dataSourceOutscaleOAPINic() *schema.Resource { } // Read Nic -func dataSourceOutscaleOAPINicRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleNicRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, okFilters := d.GetOk("filter") diff --git a/outscale/data_source_outscale_nics.go b/outscale/data_source_outscale_nics.go index 6fa3e204b..aa47e82a8 100644 --- a/outscale/data_source_outscale_nics.go +++ b/outscale/data_source_outscale_nics.go @@ -13,9 +13,9 @@ import ( ) // Creates a network interface in the specified subnet -func dataSourceOutscaleOAPINics() *schema.Resource { +func DataSourceOutscaleNics() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPINicsRead, + Read: DataSourceOutscaleNicsRead, Schema: getDSOAPINicsSchema(), } } @@ -219,7 +219,7 @@ func getDSOAPINicsSchema() map[string]*schema.Schema { } // Read Nic -func dataSourceOutscaleOAPINicsRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleNicsRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_product_type.go b/outscale/data_source_outscale_product_type.go index 308144e56..c7fbb63fc 100644 --- a/outscale/data_source_outscale_product_type.go +++ b/outscale/data_source_outscale_product_type.go @@ -13,9 +13,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIProductType() *schema.Resource { +func DataSourceOutscaleProductType() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIProductTypeRead, + Read: DataSourceOutscaleProductTypeRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -39,7 +39,7 @@ func dataSourceOutscaleOAPIProductType() *schema.Resource { } } -func dataSourceOutscaleOAPIProductTypeRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleProductTypeRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadProductTypesRequest{} diff --git a/outscale/data_source_outscale_product_types.go b/outscale/data_source_outscale_product_types.go index f0d8f7589..c45a1445c 100644 --- a/outscale/data_source_outscale_product_types.go +++ b/outscale/data_source_outscale_product_types.go @@ -12,9 +12,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIProductTypes() *schema.Resource { +func DataSourceOutscaleProductTypes() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIProductTypesRead, + Read: DataSourceOutscaleProductTypesRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -46,7 +46,7 @@ func dataSourceOutscaleOAPIProductTypes() *schema.Resource { } } -func dataSourceOutscaleOAPIProductTypesRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleProductTypesRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadProductTypesRequest{} diff --git a/outscale/data_source_outscale_public_catalog.go b/outscale/data_source_outscale_public_catalog.go index 3145e8057..33dd355ad 100644 --- a/outscale/data_source_outscale_public_catalog.go +++ b/outscale/data_source_outscale_public_catalog.go @@ -11,9 +11,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPIPublicCatalog() *schema.Resource { +func DataSourceOutscalePublicCatalog() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIPublicCatalogRead, + Read: DataSourceOutscalePublicCatalogRead, Schema: map[string]*schema.Schema{ "catalog": { Type: schema.TypeSet, @@ -71,7 +71,7 @@ func dataSourceOutscaleOAPIPublicCatalog() *schema.Resource { } } -func dataSourceOutscaleOAPIPublicCatalogRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscalePublicCatalogRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadPublicCatalogRequest{} diff --git a/outscale/data_source_outscale_public_ip.go b/outscale/data_source_outscale_public_ip.go index 820380aba..f9ccea6a3 100644 --- a/outscale/data_source_outscale_public_ip.go +++ b/outscale/data_source_outscale_public_ip.go @@ -14,9 +14,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPIPublicIP() *schema.Resource { +func DataSourceOutscalePublicIP() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIPublicIPRead, + Read: DataSourceOutscalePublicIPRead, Schema: getOAPIPublicIPDataSourceSchema(), } } @@ -63,7 +63,7 @@ func getOAPIPublicIPDataSourceSchema() map[string]*schema.Schema { } } -func dataSourceOutscaleOAPIPublicIPRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscalePublicIPRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadPublicIpsRequest{ diff --git a/outscale/data_source_outscale_public_ips.go b/outscale/data_source_outscale_public_ips.go index d4cb9ead9..c96f99f71 100644 --- a/outscale/data_source_outscale_public_ips.go +++ b/outscale/data_source_outscale_public_ips.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIPublicIPS() *schema.Resource { +func DataSourceOutscalePublicIPS() *schema.Resource { return &schema.Resource{ Read: dataSourceOutscalePublicIPSRead, Schema: oapiGetPublicIPSDataSourceSchema(), diff --git a/outscale/data_source_outscale_quota.go b/outscale/data_source_outscale_quota.go index ee323e674..4509dae9c 100644 --- a/outscale/data_source_outscale_quota.go +++ b/outscale/data_source_outscale_quota.go @@ -12,9 +12,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIQuota() *schema.Resource { +func DataSourceOutscaleQuota() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIQuotaRead, + Read: DataSourceOutscaleQuotaRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -58,7 +58,7 @@ func dataSourceOutscaleOAPIQuota() *schema.Resource { } } -func dataSourceOutscaleOAPIQuotaRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleQuotaRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadQuotasRequest{} diff --git a/outscale/data_source_outscale_quotas.go b/outscale/data_source_outscale_quotas.go index 0c0613bb5..c968ed44b 100644 --- a/outscale/data_source_outscale_quotas.go +++ b/outscale/data_source_outscale_quotas.go @@ -13,9 +13,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIQuotas() *schema.Resource { +func DataSourceOutscaleQuotas() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIQuotasRead, + Read: DataSourceOutscaleQuotasRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -67,7 +67,7 @@ func dataSourceOutscaleOAPIQuotas() *schema.Resource { } } -func dataSourceOutscaleOAPIQuotasRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleQuotasRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadQuotasRequest{} diff --git a/outscale/data_source_outscale_regions.go b/outscale/data_source_outscale_regions.go index e1ddfff87..2047e7903 100644 --- a/outscale/data_source_outscale_regions.go +++ b/outscale/data_source_outscale_regions.go @@ -10,9 +10,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPIRegions() *schema.Resource { +func DataSourceOutscaleRegions() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIRegionsRead, + Read: DataSourceOutscaleRegionsRead, Schema: map[string]*schema.Schema{ "request_id": { Type: schema.TypeString, @@ -38,7 +38,7 @@ func dataSourceOutscaleOAPIRegions() *schema.Resource { } } -func dataSourceOutscaleOAPIRegionsRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleRegionsRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI var resp oscgo.ReadRegionsResponse diff --git a/outscale/data_source_outscale_route_table.go b/outscale/data_source_outscale_route_table.go index a297f343c..9efc0e579 100644 --- a/outscale/data_source_outscale_route_table.go +++ b/outscale/data_source_outscale_route_table.go @@ -15,9 +15,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIRouteTable() *schema.Resource { +func DataSourceOutscaleRouteTable() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIRouteTableRead, + Read: DataSourceOutscaleRouteTableRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -131,7 +131,7 @@ func dataSourceOutscaleOAPIRouteTable() *schema.Resource { } } -func dataSourceOutscaleOAPIRouteTableRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleRouteTableRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI routeTableID, routeTableIDOk := d.GetOk("route_table_id") filter, filterOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_route_tables.go b/outscale/data_source_outscale_route_tables.go index 19dbbec0a..be67978e6 100644 --- a/outscale/data_source_outscale_route_tables.go +++ b/outscale/data_source_outscale_route_tables.go @@ -12,9 +12,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIRouteTables() *schema.Resource { +func DataSourceOutscaleRouteTables() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIRouteTablesRead, + Read: DataSourceOutscaleRouteTablesRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -140,7 +140,7 @@ func dataSourceOutscaleOAPIRouteTables() *schema.Resource { } } -func dataSourceOutscaleOAPIRouteTablesRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleRouteTablesRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI rtbID, rtbOk := d.GetOk("route_table_id") filter, filterOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_security_group.go b/outscale/data_source_outscale_security_group.go index dd38393f5..84d2001c9 100644 --- a/outscale/data_source_outscale_security_group.go +++ b/outscale/data_source_outscale_security_group.go @@ -14,9 +14,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPISecurityGroup() *schema.Resource { +func DataSourceOutscaleSecurityGroup() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPISecurityGroupRead, + Read: DataSourceOutscaleSecurityGroupRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -157,7 +157,7 @@ func dataSourceOutscaleOAPISecurityGroup() *schema.Resource { } } -func dataSourceOutscaleOAPISecurityGroupRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleSecurityGroupRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadSecurityGroupsRequest{} diff --git a/outscale/data_source_outscale_security_groups.go b/outscale/data_source_outscale_security_groups.go index 068cb2ddf..23c79cf2d 100644 --- a/outscale/data_source_outscale_security_groups.go +++ b/outscale/data_source_outscale_security_groups.go @@ -14,9 +14,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPISecurityGroups() *schema.Resource { +func DataSourceOutscaleSecurityGroups() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPISecurityGroupsRead, + Read: DataSourceOutscaleSecurityGroupsRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -177,7 +177,7 @@ func dataSourceOutscaleOAPISecurityGroups() *schema.Resource { } } -func dataSourceOutscaleOAPISecurityGroupsRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleSecurityGroupsRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadSecurityGroupsRequest{} diff --git a/outscale/data_source_outscale_snapshot.go b/outscale/data_source_outscale_snapshot.go index 8f263a230..481bb8d93 100644 --- a/outscale/data_source_outscale_snapshot.go +++ b/outscale/data_source_outscale_snapshot.go @@ -14,9 +14,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPISnapshot() *schema.Resource { +func DataSourceOutscaleSnapshot() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPISnapshotRead, + Read: DataSourceOutscaleSnapshotRead, Schema: map[string]*schema.Schema{ //selection criteria @@ -87,7 +87,7 @@ func dataSourceOutscaleOAPISnapshot() *schema.Resource { } } -func dataSourceOutscaleOAPISnapshotRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleSnapshotRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI restorableUsers, restorableUsersOk := d.GetOk("permission_to_create_volume") diff --git a/outscale/data_source_outscale_snapshot_export_task.go b/outscale/data_source_outscale_snapshot_export_task.go index 55433108e..ac5e40104 100644 --- a/outscale/data_source_outscale_snapshot_export_task.go +++ b/outscale/data_source_outscale_snapshot_export_task.go @@ -12,7 +12,7 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPISnapshotExportTask() *schema.Resource { +func DataSourceOutscaleSnapshotExportTask() *schema.Resource { return &schema.Resource{ Read: dataSourceOAPISnapshotExportTaskRead, Importer: &schema.ResourceImporter{ diff --git a/outscale/data_source_outscale_snapshot_export_tasks.go b/outscale/data_source_outscale_snapshot_export_tasks.go index c096d4341..295d61151 100644 --- a/outscale/data_source_outscale_snapshot_export_tasks.go +++ b/outscale/data_source_outscale_snapshot_export_tasks.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPISnapshotExportTasks() *schema.Resource { +func DataSourceOutscaleSnapshotExportTasks() *schema.Resource { return &schema.Resource{ Read: dataSourceOAPISnapshotExportTasksRead, Importer: &schema.ResourceImporter{ diff --git a/outscale/data_source_outscale_snapshots.go b/outscale/data_source_outscale_snapshots.go index 8887196d6..80487f4f0 100644 --- a/outscale/data_source_outscale_snapshots.go +++ b/outscale/data_source_outscale_snapshots.go @@ -12,9 +12,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPISnapshots() *schema.Resource { +func DataSourceOutscaleSnapshots() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPISnapshotsRead, + Read: DataSourceOutscaleSnapshotsRead, Schema: map[string]*schema.Schema{ //selection criteria @@ -105,7 +105,7 @@ func dataSourceOutscaleOAPISnapshots() *schema.Resource { } } -func dataSourceOutscaleOAPISnapshotsRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleSnapshotsRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI restorableUsers, restorableUsersOk := d.GetOk("permission_to_create_volume") diff --git a/outscale/data_source_outscale_subnet.go b/outscale/data_source_outscale_subnet.go index f522ed6f8..b2c70922f 100644 --- a/outscale/data_source_outscale_subnet.go +++ b/outscale/data_source_outscale_subnet.go @@ -15,9 +15,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPISubnet() *schema.Resource { +func DataSourceOutscaleSubnet() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPISubnetRead, + Read: DataSourceOutscaleSubnetRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -59,7 +59,7 @@ func dataSourceOutscaleOAPISubnet() *schema.Resource { } } -func dataSourceOutscaleOAPISubnetRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleSubnetRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadSubnetsRequest{} diff --git a/outscale/data_source_outscale_subnets.go b/outscale/data_source_outscale_subnets.go index 2d790dcb3..5567b8b9b 100644 --- a/outscale/data_source_outscale_subnets.go +++ b/outscale/data_source_outscale_subnets.go @@ -12,9 +12,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPISubnets() *schema.Resource { +func DataSourceOutscaleSubnets() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPISubnetsRead, + Read: DataSourceOutscaleSubnetsRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -72,7 +72,7 @@ func dataSourceOutscaleOAPISubnets() *schema.Resource { } } -func dataSourceOutscaleOAPISubnetsRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleSubnetsRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI req := oscgo.ReadSubnetsRequest{} diff --git a/outscale/data_source_outscale_subregions.go b/outscale/data_source_outscale_subregions.go index 282f04066..4f3f471cc 100644 --- a/outscale/data_source_outscale_subregions.go +++ b/outscale/data_source_outscale_subregions.go @@ -12,9 +12,9 @@ import ( "github.com/spf13/cast" ) -func dataSourceOutscaleOAPISubregions() *schema.Resource { +func DataSourceOutscaleSubregions() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPISubregionsRead, + Read: DataSourceOutscaleSubregionsRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -51,7 +51,7 @@ func dataSourceOutscaleOAPISubregions() *schema.Resource { } } -func dataSourceOutscaleOAPISubregionsRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleSubregionsRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_tag.go b/outscale/data_source_outscale_tag.go index 11f5cf5a8..e6bbfd9c4 100644 --- a/outscale/data_source_outscale_tag.go +++ b/outscale/data_source_outscale_tag.go @@ -13,9 +13,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPITag() *schema.Resource { +func DataSourceOutscaleTag() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPITagRead, + Read: DataSourceOutscaleTagRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), "key": { @@ -38,7 +38,7 @@ func dataSourceOutscaleOAPITag() *schema.Resource { } } -func dataSourceOutscaleOAPITagRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleTagRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI // Build up search parameters diff --git a/outscale/data_source_outscale_tags.go b/outscale/data_source_outscale_tags.go index ace59af95..f97df8dfd 100644 --- a/outscale/data_source_outscale_tags.go +++ b/outscale/data_source_outscale_tags.go @@ -11,9 +11,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPITags() *schema.Resource { +func DataSourceOutscaleTags() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPITagsRead, + Read: DataSourceOutscaleTagsRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), "tags": { @@ -44,7 +44,7 @@ func dataSourceOutscaleOAPITags() *schema.Resource { } } -func dataSourceOutscaleOAPITagsRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleTagsRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI // Build up search parameters diff --git a/outscale/data_source_outscale_virtual_gateway.go b/outscale/data_source_outscale_virtual_gateway.go index 07e0f49b1..884dbec87 100644 --- a/outscale/data_source_outscale_virtual_gateway.go +++ b/outscale/data_source_outscale_virtual_gateway.go @@ -14,9 +14,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIVirtualGateway() *schema.Resource { +func DataSourceOutscaleVirtualGateway() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIVirtualGatewayRead, + Read: DataSourceOutscaleVirtualGatewayRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -60,7 +60,7 @@ func dataSourceOutscaleOAPIVirtualGateway() *schema.Resource { } } -func dataSourceOutscaleOAPIVirtualGatewayRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleVirtualGatewayRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_virtual_gateways.go b/outscale/data_source_outscale_virtual_gateways.go index a42dc6141..2ef11cbd3 100644 --- a/outscale/data_source_outscale_virtual_gateways.go +++ b/outscale/data_source_outscale_virtual_gateways.go @@ -11,9 +11,9 @@ import ( "github.com/outscale/terraform-provider-outscale/utils" ) -func dataSourceOutscaleOAPIVirtualGateways() *schema.Resource { +func DataSourceOutscaleVirtualGateways() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIVirtualGatewaysRead, + Read: DataSourceOutscaleVirtualGatewaysRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -68,7 +68,7 @@ func dataSourceOutscaleOAPIVirtualGateways() *schema.Resource { } } -func dataSourceOutscaleOAPIVirtualGatewaysRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleVirtualGatewaysRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filter, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_vm.go b/outscale/data_source_outscale_vm.go index 2ad68199e..f5c8188d8 100644 --- a/outscale/data_source_outscale_vm.go +++ b/outscale/data_source_outscale_vm.go @@ -15,13 +15,13 @@ import ( "github.com/spf13/cast" ) -func dataSourceOutscaleOAPIVM() *schema.Resource { +func DataSourceOutscaleVM() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIVMRead, + Read: DataSourceOutscaleVMRead, Schema: getDataSourceOAPIVMSchemas(), } } -func dataSourceOutscaleOAPIVMRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleVMRead(d *schema.ResourceData, meta interface{}) error { client := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_vm_state.go b/outscale/data_source_outscale_vm_state.go index 558932509..a40e17def 100644 --- a/outscale/data_source_outscale_vm_state.go +++ b/outscale/data_source_outscale_vm_state.go @@ -14,9 +14,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIVMState() *schema.Resource { +func DataSourceOutscaleVMState() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIVMStateRead, + Read: DataSourceOutscaleVMStateRead, Schema: getOAPIVMStateDataSourceSchema(), } } @@ -84,7 +84,7 @@ func getVMStateAttrsSchema() map[string]*schema.Schema { } } -func dataSourceOutscaleOAPIVMStateRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleVMStateRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_vm_states.go b/outscale/data_source_outscale_vm_states.go index 7ecd97e77..8fc2e79ab 100644 --- a/outscale/data_source_outscale_vm_states.go +++ b/outscale/data_source_outscale_vm_states.go @@ -13,9 +13,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) -func dataSourceOutscaleOAPIVMStates() *schema.Resource { +func DataSourceOutscaleVMStates() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIVMStatesRead, + Read: DataSourceOutscaleVMStatesRead, Schema: getOAPIVMStatesDataSourceSchema(), } } @@ -49,7 +49,7 @@ func getOAPIVMStatesDataSourceSchema() map[string]*schema.Schema { return wholeSchema } -func dataSourceOutscaleOAPIVMStatesRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleVMStatesRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filters, filtersOk := d.GetOk("filter") diff --git a/outscale/data_source_outscale_vm_types.go b/outscale/data_source_outscale_vm_types.go index f4c34443b..c95645254 100644 --- a/outscale/data_source_outscale_vm_types.go +++ b/outscale/data_source_outscale_vm_types.go @@ -13,9 +13,9 @@ import ( "github.com/spf13/cast" ) -func dataSourceOutscaleOAPIVMTypes() *schema.Resource { +func DataSourceOutscaleVMTypes() *schema.Resource { return &schema.Resource{ - Read: dataSourceOutscaleOAPIVMTypesRead, + Read: DataSourceOutscaleVMTypesRead, Schema: map[string]*schema.Schema{ "filter": dataSourceFiltersSchema(), @@ -63,7 +63,7 @@ func dataSourceOutscaleOAPIVMTypes() *schema.Resource { } } -func dataSourceOutscaleOAPIVMTypesRead(d *schema.ResourceData, meta interface{}) error { +func DataSourceOutscaleVMTypesRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI filter, filterOk := d.GetOk("filter") diff --git a/outscale/provider.go b/outscale/provider.go index ff7ed46e0..48709ad06 100644 --- a/outscale/provider.go +++ b/outscale/provider.go @@ -105,79 +105,79 @@ func Provider() *schema.Provider { "outscale_main_route_table_link": resourceLinkMainRouteTable(), }, DataSourcesMap: map[string]*schema.Resource{ - "outscale_vm": dataSourceOutscaleOAPIVM(), + "outscale_vm": DataSourceOutscaleVM(), "outscale_vms": datasourceOutscaleOApiVMS(), - "outscale_security_group": dataSourceOutscaleOAPISecurityGroup(), - "outscale_security_groups": dataSourceOutscaleOAPISecurityGroups(), - "outscale_image": dataSourceOutscaleOAPIImage(), - "outscale_images": dataSourceOutscaleOAPIImages(), - "outscale_tag": dataSourceOutscaleOAPITag(), - "outscale_tags": dataSourceOutscaleOAPITags(), - "outscale_public_ip": dataSourceOutscaleOAPIPublicIP(), - "outscale_public_ips": dataSourceOutscaleOAPIPublicIPS(), + "outscale_security_group": DataSourceOutscaleSecurityGroup(), + "outscale_security_groups": DataSourceOutscaleSecurityGroups(), + "outscale_image": DataSourceOutscaleImage(), + "outscale_images": DataSourceOutscaleImages(), + "outscale_tag": DataSourceOutscaleTag(), + "outscale_tags": DataSourceOutscaleTags(), + "outscale_public_ip": DataSourceOutscalePublicIP(), + "outscale_public_ips": DataSourceOutscalePublicIPS(), "outscale_volume": datasourceOutscaleOAPIVolume(), "outscale_volumes": datasourceOutscaleOAPIVolumes(), - "outscale_nat_service": dataSourceOutscaleOAPINatService(), - "outscale_nat_services": dataSourceOutscaleOAPINatServices(), + "outscale_nat_service": DataSourceOutscaleNatService(), + "outscale_nat_services": DataSourceOutscaleNatServices(), "outscale_keypair": datasourceOutscaleOAPIKeyPair(), "outscale_keypairs": datasourceOutscaleOAPIKeyPairs(), - "outscale_vm_state": dataSourceOutscaleOAPIVMState(), - "outscale_vm_states": dataSourceOutscaleOAPIVMStates(), + "outscale_vm_state": DataSourceOutscaleVMState(), + "outscale_vm_states": DataSourceOutscaleVMStates(), "outscale_internet_service": datasourceOutscaleOAPIInternetService(), "outscale_internet_services": datasourceOutscaleOAPIInternetServices(), - "outscale_subnet": dataSourceOutscaleOAPISubnet(), - "outscale_subnets": dataSourceOutscaleOAPISubnets(), - "outscale_net": dataSourceOutscaleOAPIVpc(), - "outscale_nets": dataSourceOutscaleOAPIVpcs(), - "outscale_net_attributes": dataSourceOutscaleOAPIVpcAttr(), - "outscale_route_table": dataSourceOutscaleOAPIRouteTable(), - "outscale_route_tables": dataSourceOutscaleOAPIRouteTables(), - "outscale_snapshot": dataSourceOutscaleOAPISnapshot(), - "outscale_snapshots": dataSourceOutscaleOAPISnapshots(), - "outscale_net_peering": dataSourceOutscaleOAPILinPeeringConnection(), - "outscale_net_peerings": dataSourceOutscaleOAPILinPeeringsConnection(), - "outscale_nics": dataSourceOutscaleOAPINics(), - "outscale_nic": dataSourceOutscaleOAPINic(), + "outscale_subnet": DataSourceOutscaleSubnet(), + "outscale_subnets": DataSourceOutscaleSubnets(), + "outscale_net": DataSourceOutscaleVpc(), + "outscale_nets": DataSourceOutscaleVpcs(), + "outscale_net_attributes": DataSourceOutscaleVpcAttr(), + "outscale_route_table": DataSourceOutscaleRouteTable(), + "outscale_route_tables": DataSourceOutscaleRouteTables(), + "outscale_snapshot": DataSourceOutscaleSnapshot(), + "outscale_snapshots": DataSourceOutscaleSnapshots(), + "outscale_net_peering": DataSourceOutscaleLinPeeringConnection(), + "outscale_net_peerings": DataSourceOutscaleLinPeeringsConnection(), + "outscale_nics": DataSourceOutscaleNics(), + "outscale_nic": DataSourceOutscaleNic(), "outscale_client_gateway": dataSourceOutscaleClientGateway(), "outscale_client_gateways": dataSourceOutscaleClientGateways(), - "outscale_virtual_gateway": dataSourceOutscaleOAPIVirtualGateway(), - "outscale_virtual_gateways": dataSourceOutscaleOAPIVirtualGateways(), + "outscale_virtual_gateway": DataSourceOutscaleVirtualGateway(), + "outscale_virtual_gateways": DataSourceOutscaleVirtualGateways(), "outscale_vpn_connection": dataSourceOutscaleVPNConnection(), "outscale_vpn_connections": dataSourceOutscaleVPNConnections(), "outscale_access_key": dataSourceOutscaleAccessKey(), "outscale_access_keys": dataSourceOutscaleAccessKeys(), "outscale_dhcp_option": dataSourceOutscaleDHCPOption(), "outscale_dhcp_options": dataSourceOutscaleDHCPOptions(), - "outscale_load_balancer": dataSourceOutscaleOAPILoadBalancer(), - "outscale_load_balancer_listener_rule": dataSourceOutscaleOAPILoadBalancerLDRule(), - "outscale_load_balancer_listener_rules": dataSourceOutscaleOAPILoadBalancerLDRules(), - "outscale_load_balancer_tags": dataSourceOutscaleOAPILBUTags(), + "outscale_load_balancer": DataSourceOutscaleLoadBalancer(), + "outscale_load_balancer_listener_rule": DataSourceOutscaleLoadBalancerLDRule(), + "outscale_load_balancer_listener_rules": DataSourceOutscaleLoadBalancerLDRules(), + "outscale_load_balancer_tags": DataSourceOutscaleLBUTags(), "outscale_load_balancer_vm_health": dataSourceOutscaleLoadBalancerVmsHeals(), - "outscale_load_balancers": dataSourceOutscaleOAPILoadBalancers(), - "outscale_vm_types": dataSourceOutscaleOAPIVMTypes(), + "outscale_load_balancers": DataSourceOutscaleLoadBalancers(), + "outscale_vm_types": DataSourceOutscaleVMTypes(), "outscale_net_access_point": dataSourceOutscaleNetAccessPoint(), "outscale_net_access_points": dataSourceOutscaleNetAccessPoints(), - "outscale_flexible_gpu": dataSourceOutscaleOAPIFlexibleGpu(), - "outscale_flexible_gpus": dataSourceOutscaleOAPIFlexibleGpus(), - "outscale_subregions": dataSourceOutscaleOAPISubregions(), - "outscale_regions": dataSourceOutscaleOAPIRegions(), - "outscale_net_access_point_services": dataSourceOutscaleOAPINetAccessPointServices(), - "outscale_flexible_gpu_catalog": dataSourceOutscaleOAPIFlexibleGpuCatalog(), - "outscale_product_type": dataSourceOutscaleOAPIProductType(), - "outscale_product_types": dataSourceOutscaleOAPIProductTypes(), - "outscale_quotas": dataSourceOutscaleOAPIQuotas(), - "outscale_image_export_task": dataSourceOutscaleOAPIImageExportTask(), - "outscale_image_export_tasks": dataSourceOutscaleOAPIImageExportTasks(), + "outscale_flexible_gpu": DataSourceOutscaleFlexibleGpu(), + "outscale_flexible_gpus": DataSourceOutscaleFlexibleGpus(), + "outscale_subregions": DataSourceOutscaleSubregions(), + "outscale_regions": DataSourceOutscaleRegions(), + "outscale_net_access_point_services": DataSourceOutscaleNetAccessPointServices(), + "outscale_flexible_gpu_catalog": DataSourceOutscaleFlexibleGpuCatalog(), + "outscale_product_type": DataSourceOutscaleProductType(), + "outscale_product_types": DataSourceOutscaleProductTypes(), + "outscale_quotas": DataSourceOutscaleQuotas(), + "outscale_image_export_task": DataSourceOutscaleImageExportTask(), + "outscale_image_export_tasks": DataSourceOutscaleImageExportTasks(), "outscale_server_certificate": datasourceOutscaleOAPIServerCertificate(), "outscale_server_certificates": datasourceOutscaleOAPIServerCertificates(), - "outscale_snapshot_export_task": dataSourceOutscaleOAPISnapshotExportTask(), - "outscale_snapshot_export_tasks": dataSourceOutscaleOAPISnapshotExportTasks(), - "outscale_ca": dataSourceOutscaleOAPICa(), - "outscale_cas": dataSourceOutscaleOAPICas(), - "outscale_api_access_rule": dataSourceOutscaleOAPIApiAccessRule(), - "outscale_api_access_rules": dataSourceOutscaleOAPIApiAccessRules(), - "outscale_api_access_policy": dataSourceOutscaleOAPIApiAccessPolicy(), - "outscale_public_catalog": dataSourceOutscaleOAPIPublicCatalog(), + "outscale_snapshot_export_task": DataSourceOutscaleSnapshotExportTask(), + "outscale_snapshot_export_tasks": DataSourceOutscaleSnapshotExportTasks(), + "outscale_ca": DataSourceOutscaleCa(), + "outscale_cas": DataSourceOutscaleCas(), + "outscale_api_access_rule": DataSourceOutscaleApiAccessRule(), + "outscale_api_access_rules": DataSourceOutscaleApiAccessRules(), + "outscale_api_access_policy": DataSourceOutscaleApiAccessPolicy(), + "outscale_public_catalog": DataSourceOutscalePublicCatalog(), "outscale_account": dataSourceAccount(), "outscale_accounts": dataSourceAccounts(), },