hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.33k stars 1.74k forks source link

Track Apigee Organization Properties #10083

Closed danistrebel closed 2 years ago

danistrebel commented 3 years ago

Community Note

Description

Terraform apply removes non-default Apigee org properties.

From what I gathered so far:

Terraform provider mmv1 does not have the Apigee org properties defined that are set on the Apigee Org API resource e.g. :

"properties": {
    "property": [
      {
        "name": "features.hybrid.enabled",
        "value": "true"
      },
      {
        "name": "features.mart.connect.enabled",
        "value": "true"
      }
    ]
  }

as a TF resource property and therefore updates reset the properties on the organization. This currently removes the features.mart.connect.enabled property that is required for Apigee hybrid.

New or Affected Resource(s)

Potential Terraform Configuration

Add the references field to the mmv1 config.

References

bartdw commented 2 years ago

We are managing quite some apigee orgs with terraform. After some troubleshooting it turns out this issue is breaking our setup from time to time. Is there any progress on finding a solution for this bug?

danistrebel commented 2 years ago

Hi @bartdw, thanks for the +1.

We are still looking into this.

Until the fix is in place, the recommended approach for you would be to use the lifecycle attributes to ignore changes on the Apigee Organization resource and treat it as immutable to prevent the resource from breaking your setup.

xuchenma commented 2 years ago

Trying to fix this by https://github.com/GoogleCloudPlatform/magic-modules/pull/5556

github-actions[bot] commented 2 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.