Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions sysdig/resource_sysdig_secure_organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
cloudauth "github.com/draios/terraform-provider-sysdig/sysdig/internal/client/v2/cloudauth/go"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)

func resourceSysdigSecureOrganization() *schema.Resource {
Expand Down Expand Up @@ -38,11 +37,6 @@ func resourceSysdigSecureOrganization() *schema.Resource {
Type: schema.TypeString,
Required: true,
},
SchemaCloudProviderType: {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{cloudauth.Provider_PROVIDER_AWS.String(), cloudauth.Provider_PROVIDER_GCP.String(), cloudauth.Provider_PROVIDER_AZURE.String()}, false),
},
},
}
}
Expand Down Expand Up @@ -122,7 +116,6 @@ func secureOrganizationFromResourceData(data *schema.ResourceData) v2.Organizati
return v2.OrganizationSecure{
CloudOrganization: cloudauth.CloudOrganization{
ManagementAccountId: data.Get(SchemaManagementAccountId).(string),
Provider: cloudauth.Provider(cloudauth.Provider_value[data.Get(SchemaCloudProviderType).(string)]),
},
}
}
Expand All @@ -133,11 +126,6 @@ func secureOrganizationToResourceData(data *schema.ResourceData, org *v2.Organiz
return err
}

err = data.Set(SchemaCloudProviderType, org.Provider)
if err != nil {
return err
}

err = data.Set(SchemaIDKey, org.Id)
if err != nil {
return err
Expand Down
1 change: 0 additions & 1 deletion sysdig/resource_sysdig_secure_organization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ resource "sysdig_secure_cloud_auth_account" "sample" {
}
resource "sysdig_secure_organization" "sample" {
management_account_id = sysdig_secure_cloud_auth_account.sample.id
provider_type = "PROVIDER_GCP"
}
`, accountID)
}