You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into the problem that the variable enterprise_project_id is overwritten after executing terraform apply, although it is displayed correctly in terraform plan.
I Expected behavior like this in terraform plan and than I'm used terraform apply -auto-approve.
resource "sbercloud_obs_bucket" "b" {
acl = "private"
bucket = "my-first-tf-test-bucket"
bucket_domain_name = (known after apply)
bucket_version = (known after apply)
encryption = false
enterprise_project_id = "8909dsada-efhjks-sada-..."
force_destroy = false
id = (known after apply)
multi_az = (known after apply)
policy = (known after apply)
policy_format = "obs"
quota = 0
region = (known after apply)
storage_class = "STANDARD"
versioning = false
}
But After apply I got enterprise_project_id = 0.
Steps to Reproduce
terraform plan
terraform apply -auto-approve
Solve
I solved this problem by rebuilding the provider, but before that I deleted a few lines in the files.
In file vendor/github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/common.go
func GetEnterpriseProjectID(d *schema.ResourceData, config *config.Config) string {
if v, ok := d.GetOk("enterprise_project_id"); ok {
return v.(string)
}
return config.EnterpriseProjectID
}
and in vendor/github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/common/common.go
func GetEnterpriseProjectID(d *schema.ResourceData, config *config.Config) string {
if v, ok := d.GetOk("enterprise_project_id"); ok {
return v.(string)
}
return config.EnterpriseProjectID
}
The text was updated successfully, but these errors were encountered:
Hi there,
I ran into the problem that the variable
enterprise_project_id
is overwritten after executingterraform apply
, although it is displayed correctly interraform plan
.Terraform Version
terraform -v
Terraform v1.1.8
on darwin_amd64
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
I Expected behavior like this in
terraform plan
and than I'm usedterraform apply -auto-approve
.But After apply I got enterprise_project_id = 0.
Steps to Reproduce
terraform plan
terraform apply -auto-approve
Solve
I solved this problem by rebuilding the provider, but before that I deleted a few lines in the files.
In file
vendor/github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/common.go
and in
vendor/github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/common/common.go
The text was updated successfully, but these errors were encountered: