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

[Fix] Get epsID form config when resource parameter get empty #910

Merged
merged 1 commit into from
Feb 9, 2021
Merged

[Fix] Get epsID form config when resource parameter get empty #910

merged 1 commit into from
Feb 9, 2021

Conversation

Lance52259
Copy link
Collaborator

@Lance52259 Lance52259 commented Feb 8, 2021

What this PR does / why we need it:
In general, resources will search provider config when terraform config is empty.
But some resources just only use default value to create resource. It makes user's configuration in the provider useless.
So, we should update this logic referring to subnet or other resources.

Which issue this PR fixes:
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

NONE

Special notes for your reviewer:

Release note:

1. searching EnterpriseProjectID from provider config and environment variable when terraform config is empty.
2. update enterprise_project_id schema type from 'List' to 'String'

PR Checklist

  • Tests added/passed.
  • Documentation updated.
  • Schema updated.

Acceptance Steps Performed

NONE

@@ -94,12 +94,9 @@ func resourceCdmClusterV1() *schema.Resource {
},

"enterprise_project_id": {
Type: schema.TypeList,
Type: schema.TypeString,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we want to change the type, we should update the website docs.

}
return v2, nil
sysTags := make([]interface{}, 1, 1)
tag := map[string]string{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can directly assign to sysTags[0]

@ShiChangkuo ShiChangkuo merged commit 1a6811f into huaweicloud:master Feb 9, 2021
@Lance52259 Lance52259 deleted the EpsIDPatch branch February 19, 2021 01:26
@Lance52259 Lance52259 mentioned this pull request Feb 19, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants