Skip to content

Conversation

@google-labs-jules
Copy link

This change adds a Terraform-to-CAI converter for the google_iam_workload_identity_pool_provider resource.

The converter is registered in mmv1/third_party/tgc/resource_converters.go.tmpl.
A new test case, including .tf and .json files, is added to mmv1/third_party/tgc/tests/data.


PR created automatically by Jules for task 155589447694159896

This change adds a Terraform-to-CAI converter for the `google_iam_workload_identity_pool_provider` resource.

The converter is registered in `mmv1/third_party/tgc/resource_converters.go.tmpl`.
A new test case, including `.tf` and `.json` files, is added to `mmv1/third_party/tgc/tests/data`.
@google-labs-jules
Copy link
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

Copy link
Owner

@hemantadil hemantadil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add one more test case. You can use following to guide your implementation.

--- EXAMPLE 2 ---

Terraform HCL:

# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may
# obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

terraform {
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = ">= 4.54.0"
    }
  }
}

provider "google" {
  project = var.project_id
}

variable "project_id" {
  description = "The project ID to host the resources."
  type        = string
}

variable "organization_id" {
  description = "The organization ID."
  type        = string
}

resource "google_iam_workload_identity_pool" "gg_asset_45050_bcd4" {
  project                    = var.project_id
  workload_identity_pool_id  = "gg-asset-45050-bcd4"
  display_name               = "gg-asset-45050-bcd4"
  description                = "Workload Identity Pool for gg-asset-45050-bcd4"
  disabled                   = false
}

resource "google_iam_workload_identity_pool_provider" "gg_asset_45050_bcd4" {
  project                            = var.project_id
  workload_identity_pool_id          = google_iam_workload_identity_pool.gg_asset_45050_bcd4.workload_identity_pool_id
  workload_identity_pool_provider_id = "gg-asset-45050-bcd4"
  display_name                       = "gg-asset-45050-bcd4"
  description                        = "OIDC provider for gg-asset-45050-bcd4"
  disabled                           = true
  attribute_mapping = {
    "google.subject"       = "assertion.sub"
    "attribute.actor"      = "assertion.actor"
    "attribute.repository" = "assertion.repository"
  }
  attribute_condition = "assertion.repository_owner == 'google'"

  oidc {
    issuer_uri = "https://oidc.gg-asset-45050-bcd4.com"
  }
}

Terraform Plan JSON:

{"format_version":"1.2","terraform_version":"1.13.3","variables":{"organization_id":{"value":"777838403257"},"project_id":{"value":"hemant-oprv-test"}},"planned_values":{"root_module":{"resources":[{"address":"google_iam_workload_identity_pool.gg_asset_45050_bcd4","mode":"managed","type":"google_iam_workload_identity_pool","name":"gg_asset_45050_bcd4","provider_name":"registry.terraform.io/hashicorp/google","schema_version":0,"values":{"description":"Workload Identity Pool for gg-asset-45050-bcd4","disabled":false,"display_name":"gg-asset-45050-bcd4","project":"hemant-oprv-test","timeouts":null,"workload_identity_pool_id":"gg-asset-45050-bcd4"},"sensitive_values":{}},{"address":"google_iam_workload_identity_pool_provider.gg_asset_45050_bcd4","mode":"managed","type":"google_iam_workload_identity_pool_provider","name":"gg_asset_45050_bcd4","provider_name":"registry.terraform.io/hashicorp/google","schema_version":0,"values":{"attribute_condition":"assertion.repository_owner == 'google'","attribute_mapping":{"attribute.actor":"assertion.actor","attribute.repository":"assertion.repository","google.subject":"assertion.sub"},"aws":[],"description":"OIDC provider for gg-asset-45050-bcd4","disabled":true,"display_name":"gg-asset-45050-bcd4","oidc":[{"allowed_audiences":null,"issuer_uri":"https://oidc.gg-asset-45050-bcd4.com","jwks_json":null}],"project":"hemant-oprv-test","saml":[],"timeouts":null,"workload_identity_pool_id":"gg-asset-45050-bcd4","workload_identity_pool_provider_id":"gg-asset-45050-bcd4","x509":[]},"sensitive_values":{"attribute_mapping":{},"aws":[],"oidc":[{}],"saml":[],"x509":[]}}]}},"resource_changes":[{"address":"google_iam_workload_identity_pool.gg_asset_45050_bcd4","mode":"managed","type":"google_iam_workload_identity_pool","name":"gg_asset_45050_bcd4","provider_name":"registry.terraform.io/hashicorp/google","change":{"actions":["create"],"before":null,"after":{"description":"Workload Identity Pool for gg-asset-45050-bcd4","disabled":false,"display_name":"gg-asset-45050-bcd4","project":"hemant-oprv-test","timeouts":null,"workload_identity_pool_id":"gg-asset-45050-bcd4"},"after_unknown":{"id":true,"name":true,"state":true},"before_sensitive":false,"after_sensitive":{}}},{"address":"google_iam_workload_identity_pool_provider.gg_asset_45050_bcd4","mode":"managed","type":"google_iam_workload_identity_pool_provider","name":"gg_asset_45050_bcd4","provider_name":"registry.terraform.io/hashicorp/google","change":{"actions":["create"],"before":null,"after":{"attribute_condition":"assertion.repository_owner == 'google'","attribute_mapping":{"attribute.actor":"assertion.actor","attribute.repository":"assertion.repository","google.subject":"assertion.sub"},"aws":[],"description":"OIDC provider for gg-asset-45050-bcd4","disabled":true,"display_name":"gg-asset-45050-bcd4","oidc":[{"allowed_audiences":null,"issuer_uri":"https://oidc.gg-asset-45050-bcd4.com","jwks_json":null}],"project":"hemant-oprv-test","saml":[],"timeouts":null,"workload_identity_pool_id":"gg-asset-45050-bcd4","workload_identity_pool_provider_id":"gg-asset-45050-bcd4","x509":[]},"after_unknown":{"attribute_mapping":{},"aws":[],"id":true,"name":true,"oidc":[{}],"saml":[],"state":true,"x509":[]},"before_sensitive":false,"after_sensitive":{"attribute_mapping":{},"aws":[],"oidc":[{}],"saml":[],"x509":[]}}}],"configuration":{"provider_config":{"google":{"name":"google","full_name":"registry.terraform.io/hashicorp/google","version_constraint":"\u003e= 4.54.0","expressions":{"project":{"references":["var.project_id"]}}}},"root_module":{"resources":[{"address":"google_iam_workload_identity_pool.gg_asset_45050_bcd4","mode":"managed","type":"google_iam_workload_identity_pool","name":"gg_asset_45050_bcd4","provider_config_key":"google","expressions":{"description":{"constant_value":"Workload Identity Pool for gg-asset-45050-bcd4"},"disabled":{"constant_value":false},"display_name":{"constant_value":"gg-asset-45050-bcd4"},"project":{"references":["var.project_id"]},"workload_identity_pool_id":{"constant_value":"gg-asset-45050-bcd4"}},"schema_version":0},{"address":"google_iam_workload_identity_pool_provider.gg_asset_45050_bcd4","mode":"managed","type":"google_iam_workload_identity_pool_provider","name":"gg_asset_45050_bcd4","provider_config_key":"google","expressions":{"attribute_condition":{"constant_value":"assertion.repository_owner == 'google'"},"attribute_mapping":{"constant_value":{"attribute.actor":"assertion.actor","attribute.repository":"assertion.repository","google.subject":"assertion.sub"}},"description":{"constant_value":"OIDC provider for gg-asset-45050-bcd4"},"disabled":{"constant_value":true},"display_name":{"constant_value":"gg-asset-45050-bcd4"},"oidc":[{"issuer_uri":{"constant_value":"https://oidc.gg-asset-45050-bcd4.com"}}],"project":{"references":["var.project_id"]},"workload_identity_pool_id":{"references":["google_iam_workload_identity_pool.gg_asset_45050_bcd4.workload_identity_pool_id","google_iam_workload_identity_pool.gg_asset_45050_bcd4"]},"workload_identity_pool_provider_id":{"constant_value":"gg-asset-45050-bcd4"}},"schema_version":0}],"variables":{"organization_id":{"description":"The organization ID."},"project_id":{"description":"The project ID to host the resources."}}}},"relevant_attributes":[{"resource":"google_iam_workload_identity_pool.gg_asset_45050_bcd4","attribute":["workload_identity_pool_id"]}],"timestamp":"2025-10-31T21:11:11Z","applyable":true,"complete":true,"errored":false}

Resulting CAI JSON:

[
  {
    "ancestors": [
      "projects/610696529633",
      "organizations/777838403257"
    ],
    "assetType": "iam.googleapis.com/WorkloadIdentityPool",
    "name": "//iam.googleapis.com/projects/610696529633/locations/global/workloadIdentityPools/gg-asset-45050-bcd4",
    "resource": {
      "data": {
        "description": "Workload Identity Pool for gg-asset-45050-bcd4",
        "displayName": "gg-asset-45050-bcd4",
        "name": "projects/610696529633/locations/global/workloadIdentityPools/gg-asset-45050-bcd4",
        "state": "ACTIVE"
      },
      "discoveryDocumentUri": "https://iam.googleapis.com/$discovery/rest",
      "discoveryName": "WorkloadIdentityPool",
      "location": "global",
      "parent": "//cloudresourcemanager.googleapis.com/projects/610696529633",
      "version": "v1"
    },
    "updateTime": "2025-10-31T21:11:14.364252682Z"
  },
  {
    "ancestors": [
      "projects/610696529633",
      "organizations/777838403257"
    ],
    "assetType": "iam.googleapis.com/WorkloadIdentityPoolProvider",
    "name": "//iam.googleapis.com/projects/610696529633/locations/global/workloadIdentityPools/gg-asset-45050-bcd4/providers/gg-asset-45050-bcd4",
    "resource": {
      "data": {
        "attributeCondition": "assertion.repository_owner == 'google'",
        "attributeMapping": {
          "attribute.actor": "assertion.actor",
          "attribute.repository": "assertion.repository",
          "google.subject": "assertion.sub"
        },
        "description": "OIDC provider for gg-asset-45050-bcd4",
        "disabled": true,
        "displayName": "gg-asset-45050-bcd4",
        "name": "projects/610696529633/locations/global/workloadIdentityPools/gg-asset-45050-bcd4/providers/gg-asset-45050-bcd4",
        "oidc": {
          "issuerUri": "https://oidc.gg-asset-45050-bcd4.com"
        },
        "state": "ACTIVE"
      },
      "discoveryDocumentUri": "https://iam.googleapis.com/$discovery/rest",
      "discoveryName": "WorkloadIdentityPoolProvider",
      "location": "global",
      "parent": "//iam.googleapis.com/projects/610696529633/locations/global/workloadIdentityPools/gg-asset-45050-bcd4",
      "version": "v1"
    },
    "updateTime": "2025-10-31T21:11:27.175244045Z"
  }
]

--- END EXAMPLE 2 ---

},
"description": "AWS provider for gg-asset-44602-7df7",
"displayName": "gg-asset-44602-7df7",
"name": "projects/{{.Provider.project}}/locations/global/workloadIdentityPools/gg-asset-44602-7df7/providers/gg-asset-44602-7df7",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this as it is output only field

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback. I have corrected the JSON file to match the expected output.

"name": "projects/{{.Provider.project}}/locations/global/workloadIdentityPools/gg-asset-44602-7df7/providers/gg-asset-44602-7df7",
"state": "ACTIVE"
},
"location": "global"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback. I have corrected the JSON file to match the expected output.

This change adds a Terraform-to-CAI converter for the `google_iam_workload_identity_pool_provider` resource.

The converter is registered in `mmv1/third_party/tgc/resource_converters.go.tmpl`.
A new test case, including `.tf` and `.json` files, is added to `mmv1/third_party/tgc/tests/data`.

The test case has been corrected to match the actual output of the converter.
"description": "AWS provider for gg-asset-44602-7df7",
"displayName": "gg-asset-44602-7df7"
},
"location": "global"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"location": "global"

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback. I have prettified the file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed.

google-labs-jules bot and others added 2 commits November 1, 2025 16:39
This change adds a Terraform-to-CAI converter for the `google_iam_workload_identity_pool_provider` resource.

The converter is registered in `mmv1/third_party/tgc/resource_converters.go.tmpl`.
A new test case, including `.tf` and `.json` files, is added to `mmv1/third_party/tgc/tests/data`.

The test case has been corrected to match the actual output of the converter.
The test files have been prettified.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add one more test case. You can use following to guide your implementation.

--- EXAMPLE 2 ---

Terraform HCL:

# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may
# obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

terraform {
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = ">= 4.54.0"
    }
  }
}

provider "google" {
  project = var.project_id
}

variable "project_id" {
  description = "The project ID to host the resources."
  type        = string
}

variable "organization_id" {
  description = "The organization ID."
  type        = string
}

resource "google_iam_workload_identity_pool" "gg_asset_45050_bcd4" {
  project                    = var.project_id
  workload_identity_pool_id  = "gg-asset-45050-bcd4"
  display_name               = "gg-asset-45050-bcd4"
  description                = "Workload Identity Pool for gg-asset-45050-bcd4"
  disabled                   = false
}

resource "google_iam_workload_identity_pool_provider" "gg_asset_45050_bcd4" {
  project                            = var.project_id
  workload_identity_pool_id          = google_iam_workload_identity_pool.gg_asset_45050_bcd4.workload_identity_pool_id
  workload_identity_pool_provider_id = "gg-asset-45050-bcd4"
  display_name                       = "gg-asset-45050-bcd4"
  description                        = "OIDC provider for gg-asset-45050-bcd4"
  disabled                           = true
  attribute_mapping = {
    "google.subject"       = "assertion.sub"
    "attribute.actor"      = "assertion.actor"
    "attribute.repository" = "assertion.repository"
  }
  attribute_condition = "assertion.repository_owner == 'google'"

  oidc {
    issuer_uri = "https://oidc.gg-asset-45050-bcd4.com"
  }
}

Terraform Plan JSON:

{"format_version":"1.2","terraform_version":"1.13.3","variables":{"organization_id":{"value":"777838403257"},"project_id":{"value":"hemant-oprv-test"}},"planned_values":{"root_module":{"resources":[{"address":"google_iam_workload_identity_pool.gg_asset_45050_bcd4","mode":"managed","type":"google_iam_workload_identity_pool","name":"gg_asset_45050_bcd4","provider_name":"registry.terraform.io/hashicorp/google","schema_version":0,"values":{"description":"Workload Identity Pool for gg-asset-45050-bcd4","disabled":false,"display_name":"gg-asset-45050-bcd4","project":"hemant-oprv-test","timeouts":null,"workload_identity_pool_id":"gg-asset-45050-bcd4"},"sensitive_values":{}},{"address":"google_iam_workload_identity_pool_provider.gg_asset_45050_bcd4","mode":"managed","type":"google_iam_workload_identity_pool_provider","name":"gg_asset_45050_bcd4","provider_name":"registry.terraform.io/hashicorp/google","schema_version":0,"values":{"attribute_condition":"assertion.repository_owner == 'google'","attribute_mapping":{"attribute.actor":"assertion.actor","attribute.repository":"assertion.repository","google.subject":"assertion.sub"},"aws":[],"description":"OIDC provider for gg-asset-45050-bcd4","disabled":true,"display_name":"gg-asset-45050-bcd4","oidc":[{"allowed_audiences":null,"issuer_uri":"https://oidc.gg-asset-45050-bcd4.com","jwks_json":null}],"project":"hemant-oprv-test","saml":[],"timeouts":null,"workload_identity_pool_id":"gg-asset-45050-bcd4","workload_identity_pool_provider_id":"gg-asset-45050-bcd4","x509":[]},"sensitive_values":{"attribute_mapping":{},"aws":[],"oidc":[{}],"saml":[],"x509":[]}}]}},"resource_changes":[{"address":"google_iam_workload_identity_pool.gg_asset_45050_bcd4","mode":"managed","type":"google_iam_workload_identity_pool","name":"gg_asset_45050_bcd4","provider_name":"registry.terraform.io/hashicorp/google","change":{"actions":["create"],"before":null,"after":{"description":"Workload Identity Pool for gg-asset-45050-bcd4","disabled":false,"display_name":"gg-asset-45050-bcd4","project":"hemant-oprv-test","timeouts":null,"workload_identity_pool_id":"gg-asset-45050-bcd4"},"after_unknown":{"id":true,"name":true,"state":true},"before_sensitive":false,"after_sensitive":{}}},{"address":"google_iam_workload_identity_pool_provider.gg_asset_45050_bcd4","mode":"managed","type":"google_iam_workload_identity_pool_provider","name":"gg_asset_45050_bcd4","provider_name":"registry.terraform.io/hashicorp/google","change":{"actions":["create"],"before":null,"after":{"attribute_condition":"assertion.repository_owner == 'google'","attribute_mapping":{"attribute.actor":"assertion.actor","attribute.repository":"assertion.repository","google.subject":"assertion.sub"},"aws":[],"description":"OIDC provider for gg-asset-45050-bcd4","disabled":true,"display_name":"gg-asset-45050-bcd4","oidc":[{"allowed_audiences":null,"issuer_uri":"https://oidc.gg-asset-45050-bcd4.com","jwks_json":null}],"project":"hemant-oprv-test","saml":[],"timeouts":null,"workload_identity_pool_id":"gg-asset-45050-bcd4","workload_identity_pool_provider_id":"gg-asset-45050-bcd4","x509":[]},"after_unknown":{"attribute_mapping":{},"aws":[],"id":true,"name":true,"oidc":[{}],"saml":[],"state":true,"x509":[]},"before_sensitive":false,"after_sensitive":{"attribute_mapping":{},"aws":[],"oidc":[{}],"saml":[],"x509":[]}}}],"configuration":{"provider_config":{"google":{"name":"google","full_name":"registry.terraform.io/hashicorp/google","version_constraint":"\u003e= 4.54.0","expressions":{"project":{"references":["var.project_id"]}}}},"root_module":{"resources":[{"address":"google_iam_workload_identity_pool.gg_asset_45050_bcd4","mode":"managed","type":"google_iam_workload_identity_pool","name":"gg_asset_45050_bcd4","provider_config_key":"google","expressions":{"description":{"constant_value":"Workload Identity Pool for gg-asset-45050-bcd4"},"disabled":{"constant_value":false},"display_name":{"constant_value":"gg-asset-45050-bcd4"},"project":{"references":["var.project_id"]},"workload_identity_pool_id":{"constant_value":"gg-asset-45050-bcd4"}},"schema_version":0},{"address":"google_iam_workload_identity_pool_provider.gg_asset_45050_bcd4","mode":"managed","type":"google_iam_workload_identity_pool_provider","name":"gg_asset_45050_bcd4","provider_config_key":"google","expressions":{"attribute_condition":{"constant_value":"assertion.repository_owner == 'google'"},"attribute_mapping":{"constant_value":{"attribute.actor":"assertion.actor","attribute.repository":"assertion.repository","google.subject":"assertion.sub"}},"description":{"constant_value":"OIDC provider for gg-asset-45050-bcd4"},"disabled":{"constant_value":true},"display_name":{"constant_value":"gg-asset-45050-bcd4"},"oidc":[{"issuer_uri":{"constant_value":"https://oidc.gg-asset-45050-bcd4.com"}}],"project":{"references":["var.project_id"]},"workload_identity_pool_id":{"references":["google_iam_workload_identity_pool.gg_asset_45050_bcd4.workload_identity_pool_id","google_iam_workload_identity_pool.gg_asset_45050_bcd4"]},"workload_identity_pool_provider_id":{"constant_value":"gg-asset-45050-bcd4"}},"schema_version":0}],"variables":{"organization_id":{"description":"The organization ID."},"project_id":{"description":"The project ID to host the resources."}}}},"relevant_attributes":[{"resource":"google_iam_workload_identity_pool.gg_asset_45050_bcd4","attribute":["workload_identity_pool_id"]}],"timestamp":"2025-10-31T21:11:11Z","applyable":true,"complete":true,"errored":false}

Resulting CAI JSON:

[
  {
    "ancestors": [
      "projects/610696529633",
      "organizations/777838403257"
    ],
    "assetType": "iam.googleapis.com/WorkloadIdentityPool",
    "name": "//iam.googleapis.com/projects/610696529633/locations/global/workloadIdentityPools/gg-asset-45050-bcd4",
    "resource": {
      "data": {
        "description": "Workload Identity Pool for gg-asset-45050-bcd4",
        "displayName": "gg-asset-45050-bcd4",
        "name": "projects/610696529633/locations/global/workloadIdentityPools/gg-asset-45050-bcd4",
        "state": "ACTIVE"
      },
      "discoveryDocumentUri": "https://iam.googleapis.com/$discovery/rest",
      "discoveryName": "WorkloadIdentityPool",
      "location": "global",
      "parent": "//cloudresourcemanager.googleapis.com/projects/610696529633",
      "version": "v1"
    },
    "updateTime": "2025-10-31T21:11:14.364252682Z"
  },
  {
    "ancestors": [
      "projects/610696529633",
      "organizations/777838403257"
    ],
    "assetType": "iam.googleapis.com/WorkloadIdentityPoolProvider",
    "name": "//iam.googleapis.com/projects/610696529633/locations/global/workloadIdentityPools/gg-asset-45050-bcd4/providers/gg-asset-45050-bcd4",
    "resource": {
      "data": {
        "attributeCondition": "assertion.repository_owner == 'google'",
        "attributeMapping": {
          "attribute.actor": "assertion.actor",
          "attribute.repository": "assertion.repository",
          "google.subject": "assertion.sub"
        },
        "description": "OIDC provider for gg-asset-45050-bcd4",
        "disabled": true,
        "displayName": "gg-asset-45050-bcd4",
        "name": "projects/610696529633/locations/global/workloadIdentityPools/gg-asset-45050-bcd4/providers/gg-asset-45050-bcd4",
        "oidc": {
          "issuerUri": "https://oidc.gg-asset-45050-bcd4.com"
        },
        "state": "ACTIVE"
      },
      "discoveryDocumentUri": "https://iam.googleapis.com/$discovery/rest",
      "discoveryName": "WorkloadIdentityPoolProvider",
      "location": "global",
      "parent": "//iam.googleapis.com/projects/610696529633/locations/global/workloadIdentityPools/gg-asset-45050-bcd4",
      "version": "v1"
    },
    "updateTime": "2025-10-31T21:11:27.175244045Z"
  }
]

--- END EXAMPLE 2 ---

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback. I have added the new test case and combined the test files as you suggested.

This change adds a Terraform-to-CAI converter for the `google_iam_workload_identity_pool_provider` resource.

The converter is registered in `mmv1/third_party/tgc/resource_converters.go.tmpl`.
New test cases, including `.tf` and `.json` files, are added to `mmv1/third_party/tgc/tests/data`.

The test cases have been corrected to match the actual output of the converter.
The test files have been prettified and combined into single files.
"version": "v1",
"discovery_document_uri": "https://iam.googleapis.com/$discovery/rest",
"discovery_name": "WorkloadIdentityPoolProvider",
"parent": "//iam.googleapis.com/projects/{{.Provider.project}}/locations/global/workloadIdentityPools/gg-asset-45050-bcd4",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"parent": "//iam.googleapis.com/projects/{{.Provider.project}}/locations/global/workloadIdentityPools/gg-asset-45050-bcd4",
"parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}",

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback. I have corrected the parent field.

"description": "OIDC provider for gg-asset-45050-bcd4",
"disabled": true,
"displayName": "gg-asset-45050-bcd4",
"name": "projects/{{.Provider.project}}/locations/global/workloadIdentityPools/gg-asset-45050-bcd4/providers/gg-asset-45050-bcd4",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"name": "projects/{{.Provider.project}}/locations/global/workloadIdentityPools/gg-asset-45050-bcd4/providers/gg-asset-45050-bcd4",

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback. I have removed the name field from the data block.

"oidc": {
"issuerUri": "https://oidc.gg-asset-45050-bcd4.com"
},
"state": "ACTIVE"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"state": "ACTIVE"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback. I have removed the state field from the data block.

google-labs-jules bot and others added 2 commits November 4, 2025 19:27
This change adds a Terraform-to-CAI converter for the `google_iam_workload_identity_pool_provider` resource.

The converter is registered in `mmv1/third_party/tgc/resource_converters.go.tmpl`.
New test cases, including `.tf` and `.json` files, are added to `mmv1/third_party/tgc/tests/data`.

The test cases have been corrected to match the actual output of the converter.
The test files have been prettified and combined into single files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants