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

Fix permadiffs in regional health_checks and backend_service #4998

Merged

Conversation

upodroid
Copy link
Contributor

Applying #4396 to regional equivalent

log_config is computed on google_compute_backend_service so doing the same on the regional one.

https://github.com/hashicorp/terraform-provider-google/blob/master/google/resource_compute_backend_service.go#L639

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)

compute: fixed a perma-diff on `google_compute_region_health_check` when `log_config.enable` is set to false

Co-authored-by: upodroid <cy@borg.dev>
@google-cla google-cla bot added the cla: yes label Jul 27, 2021
@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.

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

@upodroid
Copy link
Contributor Author

:(

Surprised there haven't been more reports of broken HTTPS ILBs

  # module.core_web_internal_lb.google_compute_region_health_check.default["default"] will be updated in-place
  ~ resource "google_compute_region_health_check" "default" {
        id                  = "projects/REDACTED/regions/europe-west1/healthChecks/core-web-internal-hc-default"
        name                = "core-web-internal-hc-default"
        # (9 unchanged attributes hidden)


      + log_config {
          + enable = false
        }
        # (1 unchanged block hidden)
    }

  # module.cseye_web_internal_lb.google_compute_region_backend_service.default["default"] will be updated in-place
  ~ resource "google_compute_region_backend_service" "default" {
        id                              = "projects/REDACTED/regions/europe-west1/backendServices/cseye-web-internal-backend-default"
        name                            = "cseye-web-internal-backend-default"
        # (14 unchanged attributes hidden)


      ~ log_config {
          - sample_rate = 1 -> null
            # (1 unchanged attribute hidden)
        }
        # (1 unchanged block hidden)
    }

@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 ( 2 files changed, 48 insertions(+), 10 deletions(-))
Terraform Beta: Diff ( 2 files changed, 48 insertions(+), 10 deletions(-))

@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 ( 2 files changed, 48 insertions(+), 10 deletions(-))
Terraform Beta: Diff ( 3 files changed, 49 insertions(+), 12 deletions(-))

@rileykarson
Copy link
Member

/gcbrun

@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 ( 2 files changed, 48 insertions(+), 10 deletions(-))
Terraform Beta: Diff ( 2 files changed, 48 insertions(+), 10 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccAssuredWorkloadsWorkload_BasicHandWritten|TestAccAssuredWorkloadsWorkload_FullHandWritten|TestAccCloudbuildWorkerPool_basic|TestAccComputeGlobalForwardingRule_privateServiceConnectGoogleApisExample|TestAccComputeRegionHealthCheck_logConfigDisabled|TestAccComputeRegionHealthCheck_tcp_update|TestAccComputeRegionHealthCheck_typeTransition|TestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplateBasicExample|TestAccDataprocWorkflowTemplate_basic|TestAccDialogflowCXVersion_dialogflowcxVersionFullExample|TestAccEventarcTrigger_BasicHandWritten|TestAccGKEHubMembership_gkehubMembershipIssuerExample|TestAccGKEHubMembership_gkehubMembershipBasicExample|TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginBasicExample|TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginAdvancedExample|TestAccNetworkServicesEdgeCacheOrigin_updateAndImport|TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceAdvancedExample|TestAccPrivatecaCertificate_privatecaCertificateNoAuthorityExample|TestAccSecurityCenterNotificationConfig_sccNotificationConfigBasicExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=198797

@rileykarson
Copy link
Member

/gcbrun

@modular-magician
Copy link
Collaborator

Error trying to cancel build ()

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccContainerClusterDatasource_zonalTestAccCloudbuildWorkerPool_basicTestAccComputeNetwork_networkCustomMtuExampleTestAccComputeRouterPeer_basic|TestAccComputeRouterPeer_advertiseModeTestAccContainerCluster_withConfidentialNodes|TestAccContainerCluster_withILBSubsetting|TestAccContainerCluster_regionalWithNodePool|TestAccContainerCluster_withNodePoolBasic|TestAccContainerCluster_withNodePoolUpdateVersion|TestAccContainerCluster_withNodePoolResize|TestAccContainerCluster_withNodePoolAutoscaling|TestAccContainerCluster_withNodePoolMultiple|TestAccContainerCluster_withNodePoolNodeConfig|TestAccContainerCluster_withEnableKubernetesAlpha|TestAccContainerNodePool_basic|TestAccContainerNodePool_basicWithClusterId|TestAccContainerNodePool_nodeLocations|TestAccContainerNodePool_maxPodsPerNode|TestAccContainerNodePool_withWorkloadIdentityConfig|TestAccContainerNodePool_withNodeConfig|TestAccContainerNodePool_withSandboxConfig|TestAccContainerNodePool_withLinuxNodeConfig|TestAccContainerNodePool_withKubeletConfig|TestAccContainerNodePool_withInvalidUpgradeSettings|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerNodePool_withGPU|TestAccContainerNodePool_withManagement|TestAccContainerNodePool_withNodeConfigScopeAlias|TestAccContainerNodePool_autoscaling|TestAccContainerNodePool_regionalAutoscaling|TestAccContainerNodePool_resize|TestAccContainerNodePool_regionalClusters|TestAccContainerNodePool_version|TestAccContainerNodePool_012_ConfigModeAttr|TestAccContainerNodePool_EmptyGuestAccelerator|TestAccContainerNodePool_ephemeralStorageConfig|TestAccContainerNodePool_shieldedInstanceConfigTestAccDataLossPreventionDeidentifyTemplate_dlpDeidentifyTemplateBasicExampleTestAccGKEHubMembership_gkehubMembershipBasicExample|TestAccGKEHubMembership_gkehubMembershipIssuerExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=201046

@upodroid
Copy link
Contributor Author

Bump, would be great to ship this ASAP. That diff is becoming is rather annoying

Will also fix TestAccComputeRegionBackendService_regionBackendService* failures

@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 ( 2 files changed, 48 insertions(+), 10 deletions(-))
Terraform Beta: Diff ( 2 files changed, 48 insertions(+), 10 deletions(-))

@upodroid
Copy link
Contributor Author

@rileykarson Can I get this merged?

@upodroid
Copy link
Contributor Author

Last commit fixes the following diff.

-----------------------------------------------------
2021/09/21 21:07:09 [DEBUG] Google API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/2.0 200 OK
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":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: Tue, 21 Sep 2021 20:07:10 GMT
Etag: VLvcHogFWotRS8n_0kNMLs-bDdk=/PfRIcDZVB78QcDfTjJZeVeEP5Sc=
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
  "id": "43336837416584631",
  "creationTimestamp": "2021-09-21T13:06:48.571-07:00",
  "name": "foo-i4zm6oenwa",
  "description": "",
  "selfLink": "https://www.googleapis.com/compute/v1/projects/REDACTED/regions/us-central1/backendServices/foo-i4zm6oenwa",
  "healthChecks": [
"https://www.googleapis.com/compute/v1/projects/REDACTED/global/healthChecks/bar-80cqhn6b69"
  ],
  "timeoutSec": 30,
  "port": 80,
  "protocol": "HTTP",
  "fingerprint": "laUj8vIMKmg=",
  "portName": "http",
  "sessionAffinity": "NONE",
  "affinityCookieTtlSec": 0,
  "region": "https://www.googleapis.com/compute/v1/projects/REDACTED/regions/us-central1",
  "loadBalancingScheme": "INTERNAL_MANAGED",
  "connectionDraining": {
    "drainingTimeoutSec": 0
  },
  "iap": {
    "enabled": true,
    "oauth2ClientId": "test",
    "oauth2ClientSecretSha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
  },
  "logConfig": {
    "enable": true,
    "sampleRate": 1
  },
  "localityLbPolicy": "RING_HASH",
  "consistentHash": {
    "httpCookie": {
      "name": "mycookie",
      "ttl": {
        "seconds": "11",
        "nanos": 1234
      }
    },
    "minimumRingSize": "1024"
  },
  "circuitBreakers": {
    "maxConnections": 10,
    "maxPendingRequests": 1024,
    "maxRequests": 1024,
    "maxRetries": 3
  },
  "outlierDetection": {
    "consecutiveErrors": 2,
    "maxEjectionPercent": 10,
    "enforcingConsecutiveErrors": 100,
    "enforcingSuccessRate": 100,
    "successRateMinimumHosts": 5,
    "successRateRequestVolume": 100,
    "successRateStdevFactor": 1900,
    "consecutiveGatewayFailure": 5
  },
  "kind": "compute#backendService"
}

-----------------------------------------------------
2021/09/21 21:07:09 [DEBUG] Retry Transport: Stopping retries, last request was successful
2021/09/21 21:07:09 [DEBUG] Retry Transport: Returning after 1 attempts
2021/09/21 21:07:13 [INFO] Authenticating using DefaultClient...
2021/09/21 21:07:13 [INFO]   -- Scopes: [https://www.googleapis.com/auth/compute https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/cloud-identity https://www.googleapis.com/auth/ndev.clouddns.readwrite https://www.googleapis.com/auth/devstorage.full_control https://www.googleapis.com/auth/userinfo.email]
2021/09/21 21:07:13 [INFO] Authenticating using DefaultClient...
2021/09/21 21:07:13 [INFO]   -- Scopes: [https://www.googleapis.com/auth/compute https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/cloud-identity https://www.googleapis.com/auth/ndev.clouddns.readwrite https://www.googleapis.com/auth/devstorage.full_control https://www.googleapis.com/auth/userinfo.email]
2021/09/21 21:07:13 [DEBUG] Waiting for state to become: [success]
2021/09/21 21:07:13 [INFO] Terraform is using this identity: mahamed.ali.ext@proximus.com
2021/09/21 21:07:13 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
    provider_test.go:270: Step 1/4 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:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # google_compute_region_backend_service.foobar will be updated in-place
          ~ resource "google_compute_region_backend_service" "foobar" {
                id                              = "projects/REDACTED/regions/us-central1/backendServices/foo-i4zm6oenwa"
                name                            = "foo-i4zm6oenwa"
                # (15 unchanged attributes hidden)
        
        
        
        
              ~ log_config {
                  - sample_rate = 1 -> null
                    # (1 unchanged attribute hidden)
                }
        
                # (4 unchanged blocks hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
2021/09/21 21:07:19 [INFO] Authenticating using DefaultClient...

@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 ( 3 files changed, 49 insertions(+), 10 deletions(-))
Terraform Beta: Diff ( 4 files changed, 50 insertions(+), 11 deletions(-))

@upodroid
Copy link
Contributor Author

upodroid commented Nov 3, 2021

@rileykarson Now that v4 is out the door, can you take a look at this? This is a problem for me right now.

@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 ( 2 files changed, 48 insertions(+), 10 deletions(-))
Terraform Beta: Diff ( 2 files changed, 48 insertions(+), 10 deletions(-))

@rileykarson
Copy link
Member

/gcbrun

@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 ( 2 files changed, 48 insertions(+), 10 deletions(-))
Terraform Beta: Diff ( 2 files changed, 48 insertions(+), 10 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccPubsubTopicIamBindingGenerated|TestAccPubsubTopicIamMemberGenerated|TestAccPubsubTopicIamPolicyGenerated|TestAccAssuredWorkloadsWorkload_BasicHandWritten|TestAccAssuredWorkloadsWorkload_FullHandWritten|TestAccCloudRunService_cloudRunServiceSecretEnvironmentVariablesExample|TestAccCloudRunService_cloudRunServiceSecretVolumesExample|TestAccCloudRunService_secretVolume|TestAccCloudRunService_secretEnvironmentVariable|TestAccCloudFunctionsFunction_vpcConnector|TestAccComputeGlobalForwardingRule_privateServiceConnectGoogleApisExample|TestAccComputeInstanceFromMachineImage_basic|TestAccComputeInstanceFromMachineImage_overrideMetadataDotStartupScript|TestAccComputeInstanceFromMachineImage_diffProject|TestAccComputeRegionHealthCheck_tcp_update|TestAccComputeRegionHealthCheck_typeTransition|TestAccComputeRegionHealthCheck_logConfigDisabled|TestAccComputeRegionNetworkEndpointGroup_regionNetworkEndpointGroupAppengineExample|TestAccComputeServiceAttachment_serviceAttachmentBasicExampleUpdate|TestAccContainerCluster_withILBSubsetting|TestAccContainerCluster_regionalWithNodePool|TestAccContainerCluster_withNodePoolBasic|TestAccContainerCluster_withNodePoolResize|TestAccContainerCluster_withNodePoolUpdateVersion|TestAccContainerCluster_withNodePoolAutoscaling|TestAccContainerCluster_withNodePoolMultiple|TestAccContainerCluster_withNodePoolNodeConfig|TestAccContainerCluster_withEnableKubernetesAlpha|TestAccContainerNodePool_basic|TestAccContainerNodePool_basicWithClusterId|TestAccContainerNodePool_nodeLocations|TestAccContainerNodePool_maxPodsPerNode|TestAccContainerNodePool_withNodeConfig|TestAccContainerNodePool_withWorkloadIdentityConfig|TestAccContainerNodePool_withSandboxConfig|TestAccContainerNodePool_withKubeletConfig|TestAccContainerNodePool_withLinuxNodeConfig|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerNodePool_withInvalidUpgradeSettings|TestAccContainerNodePool_withGPU|TestAccContainerNodePool_withManagement|TestAccContainerNodePool_withNodeConfigScopeAlias|TestAccContainerNodePool_autoscaling|TestAccContainerNodePool_regionalAutoscaling|TestAccContainerNodePool_resize|TestAccContainerNodePool_version|TestAccContainerNodePool_regionalClusters|TestAccContainerNodePool_012_ConfigModeAttr|TestAccContainerNodePool_EmptyGuestAccelerator|TestAccContainerNodePool_ephemeralStorageConfig|TestAccDataprocWorkflowTemplate_basic|TestAccEventarcTrigger_BasicHandWritten|TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginBasicExample|TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginAdvancedExample|TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceAdvancedExample|TestAccOrgPolicyPolicy_FolderPolicy|TestAccOrgPolicyPolicy_OrganizationPolicy|TestAccPrivatecaCertificateTemplate_BasicCertificateTemplate|TestAccPubsubTopic_pubsubTopicBasicExample|TestAccSqlDatabaseInstance_withPrivateNetwork|TestAccSqlUser_postgresIAM|TestAccTPUNode_tpuNodeBUpdateTensorFlowVersion You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=218079

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.

3 participants