ianc769 opened a new pull request, #262:
URL: https://github.com/apache/cloudstack-terraform-provider/pull/262

   Update `resource_cloudstack_security_group` to allow `domainid` or 
`projectid`
   
   https://cloudstack.apache.org/api/apidocs-4.21/apis/createSecurityGroup.html
   
   This is breaking since I'm renaming `project` to `projectid` (just more 
descriptive as to what is expected in this field and matches the actual api 
call)
   
   With the code:
   
   ```hcl
   data "cloudstack_domain" "root" {
     filter {
       name  = "name"
       value = "ROOT"
     }
   }
   
   resource "cloudstack_security_group" "foo" {
     name        = "terraform-security-group-account"
     description = "terraform-security-group-account-text"
     account     = "admin"
     domainid    = "ROOT"
   }
   
   resource "cloudstack_security_group" "foo2" {
     name        = "terraform-security-group-project"
     description = "terraform-security-group-project-text"
     projectid   = "fdaa5a01-bc8c-4e50-a0ea-9135a1c54fb3"
   }
   ```
   
   
   ```shell
   12:15:41.534 STDOUT terraform: Terraform used the selected providers to 
generate the following execution
   12:15:41.534 STDOUT terraform: plan. Resource actions are indicated with the 
following symbols:
   12:15:41.535 STDOUT terraform:   + create
   12:15:41.535 STDOUT terraform:   ~ update in-place
   12:15:41.535 STDOUT terraform: Terraform will perform the following actions:
   12:15:41.535 STDOUT terraform:   # cloudstack_security_group.foo will be 
created
   12:15:41.535 STDOUT terraform:   + resource "cloudstack_security_group" 
"foo" {
   12:15:41.535 STDOUT terraform:       + account     = "admin"
   12:15:41.535 STDOUT terraform:       + description = 
"terraform-security-group-account-text"
   12:15:41.535 STDOUT terraform:       + domainid    = 
"03ff694f-a2d5-11f0-95ca-52540047021e"
   12:15:41.535 STDOUT terraform:       + id          = (known after apply)
   12:15:41.535 STDOUT terraform:       + name        = 
"terraform-security-group-account"
   12:15:41.535 STDOUT terraform:       + projectid   = (known after apply)
   12:15:41.535 STDOUT terraform:     }
   12:15:41.535 STDOUT terraform:   # cloudstack_security_group.foo2 will be 
created
   12:15:41.535 STDOUT terraform:   + resource "cloudstack_security_group" 
"foo2" {
   12:15:41.535 STDOUT terraform:       + description = 
"terraform-security-group-project-text"
   12:15:41.535 STDOUT terraform:       + domainid    = (known after apply)
   12:15:41.535 STDOUT terraform:       + id          = (known after apply)
   12:15:41.535 STDOUT terraform:       + name        = 
"terraform-security-group-project"
   12:15:41.535 STDOUT terraform:       + projectid   = 
"fdaa5a01-bc8c-4e50-a0ea-9135a1c54fb3"
   12:15:41.535 STDOUT terraform:     }
   
   12:15:57.912 STDOUT terraform: Apply complete! Resources: 2 added, 0 
changed, 0 destroyed.
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to