Skip to content

Commit

Permalink
Merge pull request #220 from smokedlinq/master
Browse files Browse the repository at this point in the history
Fix `sonarqube_permission_template` resource when `default` is `true`
  • Loading branch information
jdamata authored Oct 17, 2024
2 parents a6f5a63 + 45a62ed commit d6e8fa5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sonarqube/resource_sonarqube_permissions_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func resourceSonarqubePermissionTemplateCreate(d *schema.ResourceData, m interfa

// If default is set to true, set this permission template as the default.
if d.Get("default").(bool) {
sonarQubeURL = m.(*ProviderConfiguration).sonarQubeURL
err = resourceSonarqubePermissionTemplateSetDefault(sonarQubeURL, d.Id(), m)
if err != nil {
return err
Expand Down Expand Up @@ -189,6 +190,7 @@ func resourceSonarqubePermissionTemplateUpdate(d *schema.ResourceData, m interfa

// If default is set to true, set this permission template as the default.
if d.Get("default").(bool) {
sonarQubeURL = m.(*ProviderConfiguration).sonarQubeURL
err = resourceSonarqubePermissionTemplateSetDefault(sonarQubeURL, d.Id(), m)
if err != nil {
return err
Expand Down

0 comments on commit d6e8fa5

Please sign in to comment.