Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API Gateway resources #4066

Merged
merged 13 commits into from
Oct 23, 2020
Merged

Conversation

upodroid
Copy link
Contributor

@upodroid upodroid commented Oct 7, 2020

Fixes: hashicorp/terraform-provider-google#7212

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

`google_api_gateway_api`
`google_api_gateway_api_config`
`google_api_gateway_gateway`
`google_api_gateway_api_iam_binding`
`google_api_gateway_api_iam_member`
`google_api_gateway_api_iam_policy`
`google_api_gateway_api_config_iam_binding`
`google_api_gateway_api_config_iam_member`
`google_api_gateway_api_config_iam_policy`
`google_api_gateway_gateway_iam_binding`
`google_api_gateway_gateway_iam_member`
`google_api_gateway_gateway_iam_policy`

@google-cla google-cla bot added the cla: yes label Oct 7, 2020
@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@danawillow, please review this PR or find an appropriate assignee.

@upodroid
Copy link
Contributor Author

upodroid commented Oct 7, 2020

I have tested them but there are a few snags with google_api_gateway_api_config:

  1. The API requires the openapiDocuments object in the POST call but doesn't return it in the GET call. Is there an API that behaves like that?
  2. I didn't implement the grpc definitions because it is not available yet. https://cloud.google.com/sdk/docs/release-notes#cloud_api_gateway_2 and I don't see grpc examples in the docs.
  3. I need to write a diffsupression for the googleServiceAccount field.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 1 file changed, 21 insertions(+))
Terraform Beta: Diff ( 26 files changed, 4714 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 12 files changed, 372 insertions(+))

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 1 file changed, 21 insertions(+))
Terraform Beta: Diff ( 26 files changed, 4707 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 12 files changed, 372 insertions(+))

Copy link
Contributor

@danawillow danawillow left a comment

Choose a reason for hiding this comment

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

I have tested them but there are a few snags with google_api_gateway_api_config:

  1. The API requires the openapiDocuments object in the POST call but doesn't return it in the GET call. Is there an API that behaves like that?

check out ignore_read on the property

  1. I didn't implement the grpc definitions because it is not available yet. cloud.google.com/sdk/docs/release-notes#cloud_api_gateway_2 and I don't see grpc examples in the docs.

That's fine- it's always better to start with a resource that has too few fields and add more later, than to start with one that has too many and not all of them work.

  1. I need to write a diffsupression for the googleServiceAccount field.

Ok, let me know when that's done!

I started a first pass before realizing this didn't seem quite review-ready, so here are the comments I have in the meantime.

products/apigateway/api.yaml Outdated Show resolved Hide resolved
products/apigateway/api.yaml Outdated Show resolved Hide resolved
products/apigateway/api.yaml Outdated Show resolved Hide resolved
# The instance state - short description.
# output: true
# exclude: true
- !ruby/object:Api::Type::Time
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think our users typically care about having createTime in state, so this can be removed (but it's not super important)

Copy link
Contributor

Choose a reason for hiding this comment

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

^

products/apigateway/api.yaml Outdated Show resolved Hide resolved
products/apigateway/api.yaml Show resolved Hide resolved
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 1 file changed, 21 insertions(+))
Terraform Beta: Diff ( 26 files changed, 4806 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 12 files changed, 372 insertions(+))

@upodroid
Copy link
Contributor Author

upodroid commented Oct 7, 2020

I'm confused by this behaviour. The diff is the same.

2020/10/08 00:37:17 [INFO] Instantiating Google Cloud CloudIdentity client for path https://cloudidentity.googleapis.com/
2020/10/08 00:37:17 [DEBUG] Running CustomizeDiff. old value: projects/-/serviceAccounts/550924169191-compute@developer.gserviceaccount.com, new value: projects/-/serviceAccounts/550924169191-compute@developer.gserviceaccount.com
2020/10/08 00:37:17 [DEBUG] Running CustomizeDiff. old value: , new value: 
    TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExample: provider_test.go:267: Step 1/1 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        An execution plan has been generated and is shown below.
        Resource actions are indicated with the following symbols:
        -/+ destroy and then create replacement
        
        Terraform will perform the following actions:
        
          # google_api_gateway_api_config.api_cfg must be replaced
        -/+ resource "google_api_gateway_api_config" "api_cfg" {
                api               = "test"
                api_config_id     = "tf-test-api-cfg7b2myyjwop"
              + create_time       = (known after apply)
                display_name      = "MM Dev API Config"
              ~ id                = "projects/REDACTED/locations/global/apis/test/configs/tf-test-api-cfg7b2myyjwop" -> (known after apply)
                labels            = {
                    "environment" = "dev"
                }
              ~ name              = "projects/550924169191/locations/global/apis/test/configs/tf-test-api-cfg7b2myyjwop" -> (known after apply)
              ~ project           = "REDACTED" -> (known after apply)
              ~ service_config_id = "tf-test-api-cfg7b2myyjwop-2r0x5xxpaan7e" -> (known after apply)
        
              - gateway_config {
                  - backend_config {
                      - google_service_account = "projects/-/serviceAccounts/550924169191-compute@developer.gserviceaccount.com" -> null
                    }
                }
        
              + openapi_documents {
                  + document {
                      + contents = "c3dhZ2dlcjogJzIuMCcKaW5mbzoKICB0aXRsZTogZGV2IAogIGRlc2NyaXB0aW9uOiBTYW1wbGUgQVBJIG9uIEFQSSBHYXRld2F5IHdpdGggYSBDbG91ZCBSdW4gYmFja2VuZAogIHZlcnNpb246IDEuMC4wCnNjaGVtZXM6CiAgLSBodHRwcwpwcm9kdWNlczoKICAtIGFwcGxpY2F0aW9uL2pzb24KcGF0aHM6CiAgL2hlbGxvOgogICAgZ2V0OgogICAgICBzdW1tYXJ5OiBHcmVldCBhIHVzZXIKICAgICAgb3BlcmF0aW9uSWQ6IGhlbGxvCiAgICAgIHgtZ29vZ2xlLWJhY2tlbmQ6CiAgICAgICAgYWRkcmVzczogaHR0cHM6Ly9nb29nbGUuY29tCiAgICAgIHJlc3BvbnNlczoKICAgICAgICAnMjAwJzoKICAgICAgICAgIGRlc2NyaXB0aW9uOiBBIHN1Y2Nlc3NmdWwgcmVzcG9uc2UKICAgICAgICAgIHNjaGVtYToKICAgICAgICAgICAgdHlwZTogc3RyaW5n"
                      + path     = "spec.yaml"
                    }
                }
            }
        
        Plan: 1 to add, 0 to change, 1 to destroy.
2020/10/08 00:37:23 [INFO] Authenticating using DefaultClient...

@upodroid
Copy link
Contributor Author

upodroid commented Oct 7, 2020

This is one of the frustrating things about certain api behaviors. The OpenAPI spec is available if you open the cloud console but they couldn't make the api send it back.

Copy link
Contributor

@danawillow danawillow left a comment

Choose a reason for hiding this comment

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

Mentioned this in the other PR I'm reviewing for you, but please re-read the release notes guide for new resources so that our team doesn't have to adjust the formatting later.

Also, this PR is a bit big for my liking, especially once you make the requested test fixes. Even if it's slower for you, it's far easier on our team to review a single resource in each PR (and paradoxically, it may end up making the overall process faster for you so that you don't have to wait for us to have a large enough chunk of uninterrupted time to do a review)

templates/terraform/constants/apigateway_apiconfig.erb Outdated Show resolved Hide resolved
if serviceAccount.MatchString(new.(string)) {
parts := serviceAccount.FindStringSubmatch(new.(string))
if old == "" {
// Service account was initially null and the resource used the default service account.
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to confirm- if you don't set a service account, does the API return a value for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm currently testing it without one and it returns the value of the default service account.

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case, could it just be an optional+computed field instead of needing the customizediff?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Quick question, the ignore_read property doesn't seem to be doing anything. The email diff is fixed now.

          # google_api_gateway_api_config.api_cfg will be updated in-place
          ~ resource "google_api_gateway_api_config" "api_cfg" {
                api               = "test"
                api_config_id     = "tf-test-api-cfgtcg2rpcoux"
                display_name      = "MM Dev API Config"
                id                = "projects/REDACTED/locations/global/apis/test/configs/tf-test-api-cfgtcg2rpcoux"
                labels            = {
                    "environment" = "dev"
                }
                name              = "projects/550924169191/locations/global/apis/test/configs/tf-test-api-cfgtcg2rpcoux"
                project           = "REDACTED"
                service_config_id = "tf-test-api-cfgtcg2rpcoux-1ft53xmbt9bmr"
        
                gateway_config {
                    backend_config {
                        google_service_account = "projects/-/serviceAccounts/terraform@REDACTED.iam.gserviceaccount.com"
                    }
                }
        
              + openapi_documents {
                  + document {
                      + contents = "c3dhZ2dlcjogJzIuMCcKaW5mbzoKICB0aXRsZTogZGV2IAogIGRlc2NyaXB0aW9uOiBTYW1wbGUgQVBJIG9uIEFQSSBHYXRld2F5IHdpdGggYSBDbG91ZCBSdW4gYmFja2VuZAogIHZlcnNpb246IDEuMC4wCnNjaGVtZXM6CiAgLSBodHRwcwpwcm9kdWNlczoKICAtIGFwcGxpY2F0aW9uL2pzb24KcGF0aHM6CiAgL2hlbGxvOgogICAgZ2V0OgogICAgICBzdW1tYXJ5OiBHcmVldCBhIHVzZXIKICAgICAgb3BlcmF0aW9uSWQ6IGhlbGxvCiAgICAgIHgtZ29vZ2xlLWJhY2tlbmQ6CiAgICAgICAgYWRkcmVzczogaHR0cHM6Ly9nb29nbGUuY29tCiAgICAgIHJlc3BvbnNlczoKICAgICAgICAnMjAwJzoKICAgICAgICAgIGRlc2NyaXB0aW9uOiBBIHN1Y2Nlc3NmdWwgcmVzcG9uc2UKICAgICAgICAgIHNjaGVtYToKICAgICAgICAgICAgdHlwZTogc3RyaW5n"
                      + path     = "spec.yaml"
                    }
                }
            }

Saw this issue https://github.com/GoogleCloudPlatform/magic-modules/issues/1019

Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense / work to ignore_read on the whole openapi_documents field instead of just on contents/path?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I applied it to the parent field and it works now.

@upodroid
Copy link
Contributor Author

I have it working now but couple of observations/questions:

  1. All the fields are immutable except displayName and labels. The docs didn't mention this.
PATCH /v1beta/projects/REDACTED/locations/global/apis/test/configs/tf-test-api-cfg21ojsehdyd?alt=json&updateMask=gatewayConfig HTTP/1.1
Host: apigateway.googleapis.com
User-Agent: Terraform/0.12.29 (+https://www.terraform.io) Terraform-Plugin-SDK/2.0.3 terraform-provider-google-beta/acc 
Content-Length: 831
Content-Type: application/json
Accept-Encoding: gzip

{
 "displayName": "MM Dev API Config",
 "gatewayConfig": {
  "backendConfig": {
   "googleServiceAccount": "tf-test-api-cfg21ojsehdyd@REDACTED.iam.gserviceaccount.com"
  }
 },
 "labels": {
  "environment": "dev"
 },
 "openapiDocuments": [
  {
   "document": {
    "contents": "c3dhZ2dlcjogJzIuMCcKaW5mbzoKICB0aXRsZTogZGV2IAogIGRlc2NyaXB0aW9uOiBTYW1wbGUgQVBJIG9uIEFQSSBHYXRld2F5IHdpdGggYSBDbG91ZCBSdW4gYmFja2VuZAogIHZlcnNpb246IDEuMC4wCnNjaGVtZXM6CiAgLSBodHRwcwpwcm9kdWNlczoKICAtIGFwcGxpY2F0aW9uL2pzb24KcGF0aHM6CiAgL2hlbGxvOgogICAgZ2V0OgogICAgICBzdW1tYXJ5OiBHcmVldCBhIHVzZXIKICAgICAgb3BlcmF0aW9uSWQ6IGhlbGxvCiAgICAgIHgtZ29vZ2xlLWJhY2tlbmQ6CiAgICAgICAgYWRkcmVzczogaHR0cHM6Ly9nb29nbGUuY29tCiAgICAgIHJlc3BvbnNlczoKICAgICAgICAnMjAwJzoKICAgICAgICAgIGRlc2NyaXB0aW9uOiBBIHN1Y2Nlc3NmdWwgcmVzcG9uc2UKICAgICAgICAgIHNjaGVtYToKICAgICAgICAgICAgdHlwZTogc3RyaW5n",
    "path": "spec.yaml"
   }
  }
 ]
}

-----------------------------------------------------
2020/10/11 16:47:59 [DEBUG] Google API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 400 Bad Request
Connection: close
Transfer-Encoding: chunked
Alt-Svc: h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Date: Sun, 11 Oct 2020 15:47:59 GMT
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

c3
{
  "error": {
    "code": 400,
    "message": "update_mask paths [\"gateway_config\"] are not mutable (mutable fields are [\"labels\" \"display_name\"])",
    "status": "INVALID_ARGUMENT"
  }
}
  1. I'm not impressed with the newer APIs like apigateway, workflows and privateca. For example, when you make a POST call to create a cloud function, if you don't specify the service account it defaults to the app engine service account but it never sets the value in the api. Also, why does this API transform 550924169191-compute@developer.gserviceaccount.com to projects/-/serviceAccounts/550924169191-compute@developer.gserviceaccount.com? None of the older APIs like GCE,GCF,GAE etc behave like this. beta behaviour? Workflows API does same thing too, :(
  2. The name attribute also has the project number in the selflink instead the project id.
  3. Omitting the region from gateway resource returns a non empty plan error where the region is being set to null even though it inferred the correct region from the provider.
  4. How do I get iam resources not to have _id suffix? Pubsub topic iam is autogenerated and has topic while secret manager secret has id in it.

All the tests are passing except for TestAccApiGatewayApiConfigIam_*

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 8 files changed, 936 insertions(+))
Terraform Beta: Diff ( 26 files changed, 4532 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 12 files changed, 360 insertions(+))

@danawillow
Copy link
Contributor

I have it working now but couple of observations/questions:

  1. All the fields are immutable except displayName and labels. The docs didn't mention this.

Yeah, that happens sometimes. I usually just play around with tests and API explorer until I find out what works.

  1. I'm not impressed with the newer APIs like apigateway, workflows and privateca. For example, when you make a POST call to create a cloud function, if you don't specify the service account it defaults to the app engine service account but it never sets the value in the api. Also, why does this API transform 550924169191-compute@developer.gserviceaccount.com to projects/-/serviceAccounts/550924169191-compute@developer.gserviceaccount.com? None of the older APIs like GCE,GCF,GAE etc behave like this. beta behaviour? Workflows API does same thing too, :(

There have been a bunch of changes made over time to apis to try to have a consistent style guide for how things should behave (see https://google.aip.dev/). This means that, unfortunately, things that were once canonical behavior are now legacy. Our job as Terraform provider developers is to try to expose a UX that works for our users regardless of whether the API was created yesterday or 10 years ago.

  1. The name attribute also has the project number in the selflink instead the project id.

Does that cause issues practically, or is it just annoying because it's different?

  1. Omitting the region from gateway resource returns a non empty plan error where the region is being set to null even though it inferred the correct region from the provider.

Set default_from_api on it in terraform.yaml- we do this for just about every region field in MM- it translates to marking the generated schema field as optional+computed, which means that not setting it in the config won't show a diff.

  1. How do I get iam resources not to have _id suffix? Pubsub topic iam is autogenerated and has topic while secret manager secret has id in it.

If you set parent_resource_attribute to not have an _id suffix, does that work?

All the tests are passing except for TestAccApiGatewayApiConfigIam_*

Nice, getting there! I'm going to hold off on a thorough review until you let me know that you're ready for one.

@upodroid
Copy link
Contributor Author

If you set parent_resource_attribute to not have an _id suffix, does that work?

It doesn't work. Also it generates dodgy getImportIdQualifiers.

resource_params = extract_identifiers(resource_uri.gsub('{{name}}', "{{#{parent_resource_name}}}"))

  1. The name attribute also has the project number in the selflink instead the project id.

Does that cause issues practically, or is it just annoying because it's different?

No, the workaround is to use the id field instead of the name field.

It is ready for review. If we can't get api_gateway_api_config_iam to work, i'll write it by hand.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 7 files changed, 785 insertions(+))
Terraform Beta: Diff ( 23 files changed, 3885 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 12 files changed, 359 insertions(+))

@danawillow
Copy link
Contributor

Cool, I can try to help get the IAM resources working tomorrow. My comment from my last round of review about adding more tests still stands, but I can at least run the ones that are there now.

/gcbrun

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=152391"

@upodroid
Copy link
Contributor Author

There isn't much point in writing tests that update fields now. All the fields(except displayName and labels) are immutable right now for all 3 resources.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 7 files changed, 785 insertions(+))
Terraform Beta: Diff ( 23 files changed, 3885 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 12 files changed, 359 insertions(+))

@danawillow
Copy link
Contributor

There isn't much point in writing tests that update fields now. All the fields(except displayName and labels) are immutable right now for all 3 resources.

How do we know that updating labels with Terraform works without a test to verify it?

@upodroid
Copy link
Contributor Author

I see. I'll write a set tomorrow

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceGoogleServiceAccountIdToken_impersonation|TestAccDataSourceSpannerInstance_basic|TestAccApiGatewayApiIamBindingGenerated|TestAccApiGatewayApiIamMemberGenerated|TestAccApiGatewayApiIamPolicyGenerated|TestAccApiGatewayGatewayIamMemberGenerated|TestAccApiGatewayGatewayIamBindingGenerated|TestAccApiGatewayGatewayIamPolicyGenerated|TestAccProviderMeta_setModuleName|TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExample|TestAccApiGatewayApi_apigatewayApiBasicExample|TestAccApiGatewayGateway_apigatewayGatewayBasicExample|TestAccComputeInstance_attachedDisk|TestAccComputeInstance_attachedDisk_sourceUrl|TestAccComputeInstance_attachedDisk_modeRo|TestAccComputeInstance_bootDisk_source|TestAccComputeInstance_kmsDiskEncryption|TestAccComputeInstance_bootDisk_sourceUrl|TestAccComputeInstance_attachedDiskUpdate|TestAccComputeInstance_bootDisk_type|TestAccComputeInstance_bootDisk_mode|TestAccComputeInstance_update|TestAccComputeInstance_forceNewAndChangeMetadata|TestAccComputeInstance_scheduling|TestAccComputeInstance_serviceAccount|TestAccComputeInstance_subnet_auto|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeInstance_subnet_custom|TestAccComputeInstance_networkIPAuto|TestAccComputeInstance_private_image_family|TestAccComputeInstance_network_ip_custom|TestAccComputeInstance_forceChangeMachineTypeManually|TestAccComputeInstance_multiNic|TestAccComputeInstance_deletionProtectionExplicitFalse|TestAccComputeInstance_primaryAliasIpRange|TestAccComputeInstance_deletionProtectionExplicitTrueAndUpdateFalse|TestAccComputeInstance_secondaryAliasIpRange|TestAccComputeInstance_hostname|TestAccComputeInstance_shieldedVmConfig|TestAccComputeInstance_enableDisplay|TestAccComputeInstance_desiredStatusUpdateBasic|TestAccComputeInstance_updateRunning_desiredStatusNotSet_notAllowStoppingForUpdate|TestAccComputeInstance_updateRunning_desiredStatusRunning_notAllowStoppingForUpdate|TestAccComputeInstance_desiredStatusTerminatedUpdateFields|TestAccComputeInstance_updateRunning_desiredStatusRunning_allowStoppingForUpdate|TestAccComputeInstance_updateRunning_desiredStatusTerminated_allowStoppingForUpdate|TestAccComputeInstance_desiredStatusOnCreation|TestAccComputeInstance_updateRunning_desiredStatusTerminated_notAllowStoppingForUpdate|TestAccComputeInstance_updateTerminated_desiredStatusNotSet_allowStoppingForUpdate|TestAccComputeMachineImage_machineImageBasicExample|TestAccComputeInstance_updateTerminated_desiredStatusTerminated_allowStoppingForUpdate|TestAccComputeInstance_updateTerminated_desiredStatusTerminated_notAllowStoppingForUpdate|TestAccComputeInstance_updateTerminated_desiredStatusNotSet_notAllowStoppingForUpdate|TestAccComputeInstance_updateTerminated_desiredStatusRunning_notAllowStoppingForUpdate|TestAccComputeInstance_updateTerminated_desiredStatusRunning_allowStoppingForUpdate|TestAccComputeInstance_subnetworkUpdate|TestAccComputeNodeGroup_nodeGroupAutoscalingPolicyExample|TestAccComputeNodeGroup_nodeGroupBasicExample|TestAccComputeNodeGroup_updateNodeTemplate|TestAccComputePacketMirroring_computePacketMirroringFullExample|TestAccComputePerInstanceConfig_update|TestAccComputeRegionAutoscaler_regionAutoscalerBasicExample|TestAccComputeRegionAutoscaler_update|TestAccComputeRegionAutoscaler_scaleDownControl|TestAccComputeRegionBackendService_regionBackendServiceBalancingModeExample|TestAccComputeRegionBackendService_withBackendInternal|TestAccComputeRegionBackendService_withBackendMultiNic|TestAccComputeRegionBackendService_withBackendInternalManaged|TestAccComputeRegionBackendService_basic|TestAccComputeRegionDisk_deleteDetach|TestAccComputeRegionBackendService_ilbUpdateFull|TestAccRegionInstanceGroupManager_basic|TestAccRegionInstanceGroupManager_targetSizeZero|TestAccRegionInstanceGroupManager_update|TestAccRegionInstanceGroupManager_versions|TestAccRegionInstanceGroupManager_autoHealingPolicies|TestAccRegionInstanceGroupManager_stateful|TestAccRegionInstanceGroupManager_distributionPolicy|TestAccComputeRegionHealthCheck_tcp_update|TestAccComputeTargetInstance_targetInstanceBasicExample|TestAccComputeTargetInstance_targetInstanceCustomNetworkExample|TestAccContainerCluster_withNodeConfig|TestAccContainerCluster_withSandboxConfig|TestAccContainerNodePool_withSandboxConfig|TestAccDataprocCluster_updatable|TestAccDataprocCluster_withLifecycleConfigIdleDeleteTtl|TestAccDataprocCluster_withAutoscalingPolicy|TestAccDNSPolicy_dnsPolicyBasicExample|TestAccDNSPolicy_update|TestAccIapBrand_iapBrandExample|TestAccIapClient_iapClientExample|TestAccNetworkManagementConnectivityTest_networkManagementConnectivityTestInstancesExample|TestAccNotebooksInstance_notebookInstanceBasicExample|TestAccNotebooksInstance_notebookInstanceBasicContainerExample|TestAccNotebooksInstance_notebookInstanceFullExample|TestAccOSConfigPatchDeployment_osConfigPatchDeploymentBasicExample|TestAccOSConfigGuestPolicies_osConfigGuestPoliciesBasicExample|TestAccOSConfigPatchDeployment_osConfigPatchDeploymentInstanceExample|TestAccStorageBucketIamPolicy You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=152473"

@danawillow
Copy link
Contributor

Here's an example IAM config that works for API Config:

    iam_policy: !ruby/object:Api::Resource::IamPolicy
      allowed_iam_role: 'roles/apigateway.viewer'
      parent_resource_attribute: api_config
      base_url: projects/{{project}}/locations/global/apis/{{api}}/configs/{{api_config}}
      example_config_body: 'templates/terraform/iam/example_config_body/api_gateway_api_config.tf.erb'
      method_name_separator: ':'
      import_format: ["projects/{{project}}/locations/global/apis/{{api}}/configs/{{api_config}}", "{{project}}/{{api}}/{{api_config}}", "{{api}}/{{api_config}}", "{{api_config}}"]

For the tests, reminder that it's good to have, for each resource, one test that sets as many fields as possible (to know they all work) and another that sets as few fields as possible (to know the resource still works if certain fields aren't set)

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 11 files changed, 1017 insertions(+))
Terraform Beta: Diff ( 29 files changed, 4874 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 24 files changed, 707 insertions(+))

@upodroid
Copy link
Contributor Author

This appeared recently. https://cloud.google.com/api-gateway/docs/reference/rest/v1beta/projects.locations.apis.configs/get#configview

We are ready to merge this. All the tests are passing.

REDACTED  MCW0CDP3YY  ~  go  …  github.com  hashicorp  terraform-provider-google-beta   master  71⬇  4✎  26+  3  SIGINT  $    make testacc TEST=./google-beta TESTARGS="-run TestAccApiGateway"
==> Checking source code against gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google-beta -v -run TestAccApiGateway -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google-beta/version.ProviderVersion=acc"
=== RUN   TestAccApiGatewayApiConfigIamBindingGenerated
=== PAUSE TestAccApiGatewayApiConfigIamBindingGenerated
=== RUN   TestAccApiGatewayApiConfigIamMemberGenerated
=== PAUSE TestAccApiGatewayApiConfigIamMemberGenerated
=== RUN   TestAccApiGatewayApiConfigIamPolicyGenerated
=== PAUSE TestAccApiGatewayApiConfigIamPolicyGenerated
=== RUN   TestAccApiGatewayApiIamBindingGenerated
=== PAUSE TestAccApiGatewayApiIamBindingGenerated
=== RUN   TestAccApiGatewayApiIamMemberGenerated
=== PAUSE TestAccApiGatewayApiIamMemberGenerated
=== RUN   TestAccApiGatewayApiIamPolicyGenerated
=== PAUSE TestAccApiGatewayApiIamPolicyGenerated
=== RUN   TestAccApiGatewayGatewayIamBindingGenerated
=== PAUSE TestAccApiGatewayGatewayIamBindingGenerated
=== RUN   TestAccApiGatewayGatewayIamMemberGenerated
=== PAUSE TestAccApiGatewayGatewayIamMemberGenerated
=== RUN   TestAccApiGatewayGatewayIamPolicyGenerated
=== PAUSE TestAccApiGatewayGatewayIamPolicyGenerated
=== RUN   TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExample
=== PAUSE TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExample
=== RUN   TestAccApiGatewayApiConfig_apigatewayApiConfigFullExample
=== PAUSE TestAccApiGatewayApiConfig_apigatewayApiConfigFullExample
=== RUN   TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExampleUpdated
=== PAUSE TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExampleUpdated
=== RUN   TestAccApiGatewayApi_apigatewayApiBasicExample
=== PAUSE TestAccApiGatewayApi_apigatewayApiBasicExample
=== RUN   TestAccApiGatewayApi_apigatewayApiFullExample
=== PAUSE TestAccApiGatewayApi_apigatewayApiFullExample
=== RUN   TestAccApiGatewayApi_apigatewayApiBasicExampleUpdated
=== PAUSE TestAccApiGatewayApi_apigatewayApiBasicExampleUpdated
=== RUN   TestAccApiGatewayGateway_apigatewayGatewayBasicExample
=== PAUSE TestAccApiGatewayGateway_apigatewayGatewayBasicExample
=== RUN   TestAccApiGatewayGateway_apigatewayGatewayFullExample
=== PAUSE TestAccApiGatewayGateway_apigatewayGatewayFullExample
=== RUN   TestAccApiGatewayGateway_apigatewayGatewayBasicExampleUpdated
=== PAUSE TestAccApiGatewayGateway_apigatewayGatewayBasicExampleUpdated
=== CONT  TestAccApiGatewayApiConfigIamBindingGenerated
=== CONT  TestAccApiGatewayApiConfig_apigatewayApiConfigFullExample
=== CONT  TestAccApiGatewayGateway_apigatewayGatewayBasicExample
=== CONT  TestAccApiGatewayGateway_apigatewayGatewayFullExample
=== CONT  TestAccApiGatewayGateway_apigatewayGatewayBasicExampleUpdated
=== CONT  TestAccApiGatewayApi_apigatewayApiFullExample
=== CONT  TestAccApiGatewayApi_apigatewayApiBasicExampleUpdated
=== CONT  TestAccApiGatewayApiIamPolicyGenerated
2020/10/17 00:29:26 [DEBUG] Retry Transport: Stopping retries, last request failed with non-retryable error: empty non-retryable error received. This is a bug with the Terraform provider and should be reported as a GitHub issue in the provider repository.
2020/10/17 00:29:26 [DEBUG] Retry Transport: Returning after 1 attempts
--- PASS: TestAccApiGatewayApi_apigatewayApiFullExample (312.74s)
=== CONT  TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExample
--- PASS: TestAccApiGatewayApiIamPolicyGenerated (353.18s)
=== CONT  TestAccApiGatewayGatewayIamPolicyGenerated
--- PASS: TestAccApiGatewayApi_apigatewayApiBasicExampleUpdated (355.69s)
=== CONT  TestAccApiGatewayGatewayIamMemberGenerated
2020/10/17 00:32:10 [DEBUG] Retry Transport: starting RoundTrip retry loop
2020/10/17 00:32:10 [DEBUG] Retry Transport: request attempt 0
--- PASS: TestAccApiGatewayApiConfig_apigatewayApiConfigFullExample (443.53s)
=== CONT  TestAccApiGatewayGatewayIamBindingGenerated
--- PASS: TestAccApiGatewayApiConfigIamBindingGenerated (515.90s)
=== CONT  TestAccApiGatewayApiIamBindingGenerated
--- PASS: TestAccApiGatewayGateway_apigatewayGatewayBasicExample (576.91s)
=== CONT  TestAccApiGatewayApiIamMemberGenerated
--- PASS: TestAccApiGatewayGateway_apigatewayGatewayFullExample (608.88s)
=== CONT  TestAccApiGatewayApiConfigIamPolicyGenerated
--- PASS: TestAccApiGatewayGateway_apigatewayGatewayBasicExampleUpdated (624.27s)
=== CONT  TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExampleUpdated
--- PASS: TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExample (361.07s)
=== CONT  TestAccApiGatewayApiConfigIamMemberGenerated
--- PASS: TestAccApiGatewayApiIamBindingGenerated (291.30s)
=== CONT  TestAccApiGatewayApi_apigatewayApiBasicExample
--- PASS: TestAccApiGatewayApiIamMemberGenerated (232.69s)
--- PASS: TestAccApiGatewayGatewayIamMemberGenerated (535.79s)
--- PASS: TestAccApiGatewayGatewayIamPolicyGenerated (565.48s)
--- PASS: TestAccApiGatewayGatewayIamBindingGenerated (548.20s)
--- PASS: TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExampleUpdated (368.72s)
--- PASS: TestAccApiGatewayApi_apigatewayApiBasicExample (187.24s)
--- PASS: TestAccApiGatewayApiConfigIamPolicyGenerated (392.89s)
--- PASS: TestAccApiGatewayApiConfigIamMemberGenerated (381.55s)
PASS
ok      github.com/hashicorp/terraform-provider-google-beta/google-beta 1059.997s

create_url: projects/{{project}}/locations/global/apis/{{api}}/configs?apiConfigId={{api_config_id}}
self_link: projects/{{project}}/locations/global/apis/{{api}}/configs/{{api_config_id}}
base_url: projects/{{project}}/locations/global/apis/{{api}}/configs
read_query_params: '?view=FULL'
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you tried just setting this on self_link? If that works, then you can avoid having to add an extra MM attribute

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't but I generated one now and it doesn't work. It replaced all the urls including Create and Delete methods

2020/10/21 19:23:23 [DEBUG] Google API Request Details:
---[ REQUEST ]---------------------------------------
DELETE /v1beta/projects/REDACTED/locations/global/apis/test/configs/tf-test-api-cfgwn1ovme2i3?alt=json&view=FULL HTTP/1.1
Host: apigateway.googleapis.com
User-Agent: Terraform/0.12.29 (+https://www.terraform.io) Terraform-Plugin-SDK/2.0.3 terraform-provider-google-beta/acc 
Content-Type: application/json
Accept-Encoding: gzip


-----------------------------------------------------
2020/10/21 19:23:24 [DEBUG] Google API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 400 Bad Request
Connection: close
Transfer-Encoding: chunked
Alt-Svc: h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Date: Wed, 21 Oct 2020 18:23:24 GMT
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

229
{
  "error": {
    "code": 400,
    "message": "Invalid JSON payload received. Unknown name \"view\": Cannot bind query parameter. Field 'view' could not be found in request message.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "description": "Invalid JSON payload received. Unknown name \"view\": Cannot bind query parameter. Field 'view' could not be found in request message."
          }
        ]
      }
    ]
  }
}

0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to go with the mm attribute.

# The instance state - short description.
# output: true
# exclude: true
- !ruby/object:Api::Type::Time
Copy link
Contributor

Choose a reason for hiding this comment

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

^

products/apigateway/api.yaml Show resolved Hide resolved
products/apigateway/api.yaml Outdated Show resolved Hide resolved
products/apigateway/api.yaml Show resolved Hide resolved
products/apigateway/api.yaml Outdated Show resolved Hide resolved
products/apigateway/api.yaml Show resolved Hide resolved
products/apigateway/api.yaml Show resolved Hide resolved
products/apigateway/api.yaml Show resolved Hide resolved
Backend settings that are applied to all backends of the Gateway.
properties:
- !ruby/object:Api::Type::String
name: 'googleServiceAccount'
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it defaults to the GCE default service account.

Same with the parent field.

Copy link
Contributor

Choose a reason for hiding this comment

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

That true if the user doesn't specify a gatewayConfig though, right? If so, then we can just allow users that don't set one to have the API-given default, and require users that do set it to actually specify the field.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i see, make it required on googleServiceAccount but not on backendConfig

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess my question is, is there a functional difference between these three scenarios?
1:

gatewayConfig: null

2:

gatewayConfig: {}

3:

gatewayConfig: {
  backendConfig: {}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The null is tested in the basic example and there are no problems there.

The other two.

 REDACTED  MCW0CDP3YY  ~  $  echo '{"openapiDocuments":[{"document":{"contents":"c3dhZ2dlcjogJzIuMCcKaW5mbzoKICB0aXRsZTogZGV2IAogIGRlc2NyaXB0aW9uOiBTYW1wbGUgQVBJIG9uIEFQSSBHYXRld2F5IHdpdGggYSBDbG91ZCBSdW4gYmFja2VuZAogIHZlcnNpb246IDEuMC4wCnNjaGVtZXM6CiAgLSBodHRwcwpwcm9kdWNlczoKICAtIGFwcGxpY2F0aW9uL2pzb24KcGF0aHM6CiAgL2hlbGxvOgogICAgZ2V0OgogICAgICBzdW1tYXJ5OiBHcmVldCBhIHVzZXIKICAgICAgb3BlcmF0aW9uSWQ6IGhlbGxvCiAgICAgIHgtZ29vZ2xlLWJhY2tlbmQ6CiAgICAgICAgYWRkcmVzczogaHR0cHM6Ly9nb29nbGUuY29tCiAgICAgIHJlc3BvbnNlczoKICAgICAgICAnMjAwJzoKICAgICAgICAgIGRlc2NyaXB0aW9uOiBBIHN1Y2Nlc3NmdWwgcmVzcG9uc2UKICAgICAgICAgIHNjaGVtYToKICAgICAgICAgICAgdHlwZTogc3RyaW5n","path":"spec.yaml"}}],"gatewayConfig":{"backendConfig":{}}}' | http POST "https://apigateway.googleapis.com/v1beta/projects/REDACTED/locations/global/apis/test/configs?alt=json&apiConfigId=potato" "Authorization: Bearer $(gcloud auth print-access-token)"
HTTP/1.1 200 OK
Alt-Svc: h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Cache-Control: private
Content-Encoding: gzip
Content-Type: application/json; charset=UTF-8
Date: Wed, 21 Oct 2020 18:35:45 GMT
Server: ESF
Transfer-Encoding: chunked
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0

{
    "done": false,
    "metadata": {
        "@type": "type.googleapis.com/google.cloud.apigateway.v1beta.OperationMetadata",
        "apiVersion": "v1beta",
        "createTime": "2020-10-21T18:35:45.486637683Z",
        "requestedCancellation": false,
        "target": "projects/REDACTED/locations/global/apis/test/configs/potato",
        "verb": "create"
    },
    "name": "projects/REDACTED/locations/global/operations/operation-1603305344956-5b2329d8d7825-80f08ca0-cb70a3e5"
}

 REDACTED  MCW0CDP3YY  ~  SIGINT  $  echo '{"openapiDocuments":[{"document":{"contents":"c3dhZ2dlcjogJzIuMCcKaW5mbzoKICB0aXRsZTogZGV2IAogIGRlc2NyaXB0aW9uOiBTYW1wbGUgQVBJIG9uIEFQSSBHYXRld2F5IHdpdGggYSBDbG91ZCBSdW4gYmFja2VuZAogIHZlcnNpb246IDEuMC4wCnNjaGVtZXM6CiAgLSBodHRwcwpwcm9kdWNlczoKICAtIGFwcGxpY2F0aW9uL2pzb24KcGF0aHM6CiAgL2hlbGxvOgogICAgZ2V0OgogICAgICBzdW1tYXJ5OiBHcmVldCBhIHVzZXIKICAgICAgb3BlcmF0aW9uSWQ6IGhlbGxvCiAgICAgIHgtZ29vZ2xlLWJhY2tlbmQ6CiAgICAgICAgYWRkcmVzczogaHR0cHM6Ly9nb29nbGUuY29tCiAgICAgIHJlc3BvbnNlczoKICAgICAgICAnMjAwJzoKICAgICAgICAgIGRlc2NyaXB0aW9uOiBBIHN1Y2Nlc3NmdWwgcmVzcG9uc2UKICAgICAgICAgIHNjaGVtYToKICAgICAgICAgICAgdHlwZTogc3RyaW5n","path":"spec.yaml"}}],"gatewayConfig":{}}' | http POST "https://apigateway.googleapis.com/v1beta/projects/REDACTED/locations/global/apis/test/configs?alt=json&apiConfigId=tf-test-api-cfgvjqjfh298j" "Authorization: Bearer $(gcloud auth print-access-token)"
HTTP/1.1 200 OK
Alt-Svc: h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Cache-Control: private
Content-Encoding: gzip
Content-Type: application/json; charset=UTF-8
Date: Wed, 21 Oct 2020 18:31:53 GMT
Server: ESF
Transfer-Encoding: chunked
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0

{
    "done": false,
    "metadata": {
        "@type": "type.googleapis.com/google.cloud.apigateway.v1beta.OperationMetadata",
        "apiVersion": "v1beta",
        "createTime": "2020-10-21T18:31:53.702041935Z",
        "requestedCancellation": false,
        "target": "projects/REDACTED/locations/global/apis/test/configs/tf-test-api-cfgvjqjfh298j",
        "verb": "create"
    },
    "name": "projects/REDACTED/locations/global/operations/operation-1603305113163-5b2328fbc959d-c44b83b5-1c27fca5"
}

Copy link
Contributor

Choose a reason for hiding this comment

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

It's not about whether or not there are problems, but about providing a consistent interface to our users and helping them write their configs correctly. If there are two ways of doing the exact same thing, we can simplify and make it so that there's only one way. hashicorp/terraform-provider-google#3928 has more context on why we try not to allow objects with only optional fields. It's a thing we allow only when there is a specific need.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't follow.

Are you saying make all the child fields mandatory and the top level field (gatewayConfig) optional?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, did that in my last commit.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 11 files changed, 1017 insertions(+))
Terraform Beta: Diff ( 29 files changed, 4859 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 24 files changed, 707 insertions(+))

@danawillow
Copy link
Contributor

/gcbrun

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=153825"

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 11 files changed, 1017 insertions(+))
Terraform Beta: Diff ( 29 files changed, 4859 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 24 files changed, 707 insertions(+))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccApiGatewayApiConfigIamBindingGenerated|TestAccApiGatewayApiConfigIamMemberGenerated|TestAccApiGatewayApiConfigIamPolicyGenerated|TestAccApiGatewayApiIamBindingGenerated|TestAccApiGatewayApiIamMemberGenerated|TestAccApiGatewayGatewayIamBindingGenerated|TestAccApiGatewayApiIamPolicyGenerated|TestAccDataSourceSpannerInstance_basic|TestAccApiGatewayGatewayIamPolicyGenerated|TestAccApiGatewayGatewayIamMemberGenerated|TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExample|TestAccApiGatewayApiConfig_apigatewayApiConfigFullExample|TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExampleUpdated|TestAccApiGatewayApi_apigatewayApiBasicExample|TestAccApiGatewayApi_apigatewayApiFullExample|TestAccApiGatewayGateway_apigatewayGatewayBasicExample|TestAccApiGatewayGateway_apigatewayGatewayFullExample|TestAccApiGatewayApi_apigatewayApiBasicExampleUpdated|TestAccApiGatewayGateway_apigatewayGatewayBasicExampleUpdated|TestAccComputeInstance_attachedDisk|TestAccComputeInstance_attachedDisk_sourceUrl|TestAccComputeInstance_attachedDisk_modeRo|TestAccComputeInstance_attachedDiskUpdate|TestAccComputeInstance_bootDisk_source|TestAccComputeInstance_kmsDiskEncryption|TestAccComputeInstance_bootDisk_sourceUrl|TestAccComputeInstance_private_image_family|TestAccComputeRegionDisk_deleteDetach|TestAccContainerCluster_withNodeConfigShieldedInstanceConfig You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=153831"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=153837"

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceSpannerInstance_basic|TestAccApiGatewayApiConfigIamBindingGenerated|TestAccApiGatewayApiConfigIamMemberGenerated|TestAccApiGatewayApiConfigIamPolicyGenerated|TestAccApiGatewayApiIamBindingGenerated|TestAccApiGatewayApiIamMemberGenerated|TestAccApiGatewayApiIamPolicyGenerated|TestAccApiGatewayGatewayIamBindingGenerated|TestAccApiGatewayGatewayIamMemberGenerated|TestAccApiGatewayGatewayIamPolicyGenerated|TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExample|TestAccApiGatewayApiConfig_apigatewayApiConfigFullExample|TestAccApiGatewayApiConfig_apigatewayApiConfigBasicExampleUpdated|TestAccApiGatewayApi_apigatewayApiBasicExample|TestAccApiGatewayApi_apigatewayApiFullExample|TestAccApiGatewayApi_apigatewayApiBasicExampleUpdated|TestAccApiGatewayGateway_apigatewayGatewayBasicExample|TestAccApiGatewayGateway_apigatewayGatewayFullExample|TestAccApiGatewayGateway_apigatewayGatewayBasicExampleUpdated|TestAccComputeInstance_attachedDisk_sourceUrl|TestAccComputeInstance_attachedDisk|TestAccComputeInstance_attachedDisk_modeRo|TestAccComputeInstance_attachedDiskUpdate|TestAccComputeInstance_bootDisk_source|TestAccComputeInstance_bootDisk_sourceUrl|TestAccComputeInstance_kmsDiskEncryption|TestAccComputeInstance_private_image_family|TestAccComputeRegionDisk_deleteDetach|TestAccContainerCluster_withNodeConfigShieldedInstanceConfig You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=153862"

@danawillow danawillow merged commit a36324c into GoogleCloudPlatform:master Oct 23, 2020
@upodroid
Copy link
Contributor Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add API Gateway Resources
3 participants