Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: remove environment import #918

Merged
merged 5 commits into from
Jul 31, 2024
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
4 changes: 0 additions & 4 deletions client/api_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,6 @@ type ApiClientInterface interface {
TeamRoleAssignments(payload *TeamRoleAssignmentListPayload) ([]TeamRoleAssignmentPayload, error)
KubernetesCredentialsCreate(payload *KubernetesCredentialsCreatePayload) (*Credentials, error)
KubernetesCredentialsUpdate(id string, payload *KubernetesCredentialsUpdatePayload) (*Credentials, error)
EnvironmentImportCreate(payload *EnvironmentImportCreatePayload) (*EnvironmentImport, error)
EnvironmentImportUpdate(id string, payload *EnvironmentImportUpdatePayload) (*EnvironmentImport, error)
EnvironmentImportGet(id string) (*EnvironmentImport, error)
EnvironmentImportDelete(id string) error
ConfigurationSetCreate(payload *CreateConfigurationSetPayload) (*ConfigurationSet, error)
ConfigurationSetUpdate(id string, payload *UpdateConfigurationSetPayload) (*ConfigurationSet, error)
ConfigurationSet(id string) (*ConfigurationSet, error)
Expand Down
59 changes: 0 additions & 59 deletions client/api_client_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 0 additions & 90 deletions client/environment_import.go

This file was deleted.

122 changes: 0 additions & 122 deletions client/environment_import_test.go

This file was deleted.

1 change: 0 additions & 1 deletion env0/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ func Provider(version string) plugin.ProviderFunc {
"env0_aws_eks_credentials": resourceAwsEksCredentials(),
"env0_azure_aks_credentials": resourceAzureAksCredentials(),
"env0_gcp_gke_credentials": resourceGcpGkeCredentials(),
"env0_environment_import": resourceEnvironmentImport(),
"env0_variable_set": resourceVariableSet(),
"env0_variable_set_assignment": resourceVariableSetAssignment(),
},
Expand Down
5 changes: 2 additions & 3 deletions env0/resource_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func resourceEnvironment() *schema.Resource {
UpdateContext: resourceEnvironmentUpdate,
DeleteContext: resourceEnvironmentDelete,

Importer: &schema.ResourceImporter{StateContext: resourceEnvironmentImporter},
Importer: &schema.ResourceImporter{StateContext: resourceEnvironmentImport},

Schema: map[string]*schema.Schema{
"id": {
Expand Down Expand Up @@ -1372,8 +1372,7 @@ func getEnvironmentById(environmentId string, meta interface{}) (client.Environm
return environment, nil
}

// a function to import an environment resource not to be consufed with the "environment import" resource (which is a different resource)
func resourceEnvironmentImporter(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
func resourceEnvironmentImport(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
id := d.Id()
var getErr diag.Diagnostics

Expand Down
Loading
Loading