-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feat: add new OIDC credentials creation and assigment (AWS Resource) #755
Conversation
@@ -100,6 +100,7 @@ func Provider(version string) plugin.ProviderFunc { | |||
"env0_template": resourceTemplate(), | |||
"env0_ssh_key": resourceSshKey(), | |||
"env0_aws_credentials": resourceAwsCredentials(), | |||
"env0_aws_oidc_credentials": resourceAwsOidcCredentials(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed. A new resource is created (same for GCP and Azure).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM left some minor comments
@@ -0,0 +1,2 @@ | |||
terraform import env0_aws_oidc_credentials.by_id d31a6b30-5f69-4d24-937c-22322754934e | |||
terraform import env0_aws_oidc_credentials.by_name "credentials name" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look like you are missing an empty line here
} | ||
|
||
func resourceAwsOidcCredentialsUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { | ||
apiClient := meta.(client.ApiClientInterface) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you extract the part before you put value in request
into a function? I see it's the same code in resourceAwsOidcCredentialsUpdate
and in resourceAwsOidcCredentialsCreate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
fixed. |
Solution
Part of #743.