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

Revert "The version field should be under configmanagement instead of under oci" #1792

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,6 @@ func expandGKEHub2FeatureFleetDefaultMemberConfigConfigmanagement(v interface{},
original := raw.(map[string]interface{})
transformed := make(map[string]interface{})

transformedVersion, err := expandGKEHub2FeatureFleetDefaultMemberConfigConfigmanagementVersion(original["version"], d, config)
if err != nil {
return nil, err
} else if val := reflect.ValueOf(transformedVersion); val.IsValid() && !tpgresource.IsEmptyValue(val) {
transformed["version"] = transformedVersion
}

transformedConfigSync, err := expandGKEHub2FeatureFleetDefaultMemberConfigConfigmanagementConfigSync(original["config_sync"], d, config)
if err != nil {
return nil, err
Expand All @@ -300,10 +293,6 @@ func expandGKEHub2FeatureFleetDefaultMemberConfigConfigmanagement(v interface{},
return transformed, nil
}

func expandGKEHub2FeatureFleetDefaultMemberConfigConfigmanagementVersion(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
return v, nil
}

func expandGKEHub2FeatureFleetDefaultMemberConfigConfigmanagementConfigSync(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
l := v.([]interface{})
if len(l) == 0 || l[0] == nil {
Expand Down Expand Up @@ -485,6 +474,13 @@ func expandGKEHub2FeatureFleetDefaultMemberConfigConfigmanagementConfigSyncOci(v
transformed["syncWaitSecs"] = transformedSyncWaitSecs
}

transformedVersion, err := expandGKEHub2FeatureFleetDefaultMemberConfigConfigmanagementConfigSyncOciVersion(original["version"], d, config)
if err != nil {
return nil, err
} else if val := reflect.ValueOf(transformedVersion); val.IsValid() && !tpgresource.IsEmptyValue(val) {
transformed["version"] = transformedVersion
}

return transformed, nil
}

Expand All @@ -508,6 +504,10 @@ func expandGKEHub2FeatureFleetDefaultMemberConfigConfigmanagementConfigSyncOciSy
return v, nil
}

func expandGKEHub2FeatureFleetDefaultMemberConfigConfigmanagementConfigSyncOciVersion(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
return v, nil
}

func expandGKEHub2FeatureFleetDefaultMemberConfigPolicycontroller(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
l := v.([]interface{})
if len(l) == 0 || l[0] == nil {
Expand Down