-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 PREMIUM for Global external IP addresses #9089
Conversation
Hello! I am a robot. It looks like you are a: @c2thorn, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
Tests analyticsTotal tests: Action takenFound 56 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccAlloydbInstance_createInstanceWithNetworkConfigAndAllocatedIPRange|TestAccAlloydbCluster_withNetworkConfigAndAllocatedIPRange|TestAccAlloydbBackup_alloydbBackupFullExample|TestAccAlloydbInstance_createInstanceWithMandatoryFields|TestAccAlloydbBackup_alloydbBackupBasicExample|TestAccAlloydbBackup_update|TestAccAlloydbCluster_restore|TestAccAlloydbBackup_createBackupWithMandatoryFields|TestAccAlloydbInstance_createPrimaryAndReadPoolInstance|TestAccAlloydbInstance_alloydbInstanceBasicExample|TestAccAlloydbInstance_update|TestAccAlloydbBackup_usingCMEK|TestAccApigeeEnvReferences_apigeeEnvironmentReferenceTestExample|TestAccApigeeAddonsConfig_apigeeAddonsTestExample|TestAccApigeeTargetServer_apigeeTargetServerTestExample|TestAccApigeeEnvKeystore_apigeeEnvironmentKeystoreTestExample|TestAccApigeeTargetServer_apigeeTargetServerTest_update|TestAccApigeeEnvironmentIamBindingGenerated|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccApigeeEnvironmentIamMemberGenerated|TestAccBackupDRManagementServer_backupDrManagementServerExample|TestAccCloudbuildWorkerPool_withNetwork|TestAccCloudBuildBitbucketServerConfig_cloudbuildBitbucketServerConfigPeeredNetworkExample|TestAccCloudIdsEndpoint_basic|TestAccDataSourceComputeGlobalAddress|TestAccComputeBackendBucket_externalCdnLbWithBackendBucketExample|TestAccComputeGlobalAddress_ipv6|TestAccComputeGlobalAddress_internal|TestAccComputeGlobalAddress_globalAddressPrivateServicesConnectExample|TestAccComputeGlobalAddress_globalAddressBasicExample|TestAccComputeGlobalForwardingRule_externalHttpLbMigBackendCustomHeaderExample|TestAccComputeGlobalForwardingRule_externalTcpProxyLbMigBackendExample|TestAccComputeGlobalForwardingRule_privateServiceConnectGoogleApisNoAutomateDnsExample|TestAccComputeGlobalForwardingRule_privateServiceConnectGoogleApisExample|TestAccDatabaseMigrationServiceConnectionProfile_databaseMigrationServiceConnectionProfileAlloydbExample|TestAccDataFusionInstance_dataFusionInstanceFullExample|TestAccDataprocClusterIamPolicy|TestAccLookerInstance_lookerInstanceEnterpriseFullExample|TestAccMemcacheInstance_memcacheInstanceBasicExample|TestAccMemcacheInstance_update|TestAccRedisInstance_redisInstancePrivateServiceExample|TestAccDataSourceGoogleServiceAccountJwt|TestAccDataSourceGoogleServiceAccountAccessToken_basic|TestAccServiceNetworkingConnection_update|TestAccServiceNetworkingConnection_create|TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccServiceNetworkingPeeredDNSDomain_basic|TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeReplica|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone|TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange|TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange|TestAccTPUNode_tpuNodeFullExample|TestAccVertexAIIndexEndpoint_vertexAiIndexEndpointExample|TestAccVertexAIIndexEndpoint_updated|TestAccVertexAIEndpoint_vertexAiEndpointNetwork |
Rerun these tests in REPLAYING mode to catch issues
|
Seems fine based on documentation, but I want to know why current implementations are not failing without this? @edwardmedia |
@c2thorn See hashicorp/terraform-provider-google#15982 This does currently fail when a GCP project's default network tier is set to STANDARD rather than PREMIUM. The documentation states that the GCP's REST API will assume PREMIUM for any global address. In practice, this isn't the case, and I've verified it via cURL as well curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $(gcloud auth print-access-token)" "https://compute.googleapis.com/compute/v1/projects/${PROJECT_ID}/global/addresses?alt=json" --data '{"name":"${GLOBAL_IP_ADDRESS_NAME}"}'
{
"error": {
"code": 400,
"message": "STANDARD network tier (the project's default network tier) is not supported: STANDARD network tier is not supported for global address.",
"errors": [
{
"message": "STANDARD network tier (the project's default network tier) is not supported: STANDARD network tier is not supported for global address.",
"domain": "global",
"reason": "badRequest"
}
]
}
} curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $(gcloud auth print-access-token)" "https://compute.googleapis.com/compute/v1/projects/${PROJECT_ID}/global/addresses?alt=json" --data '{"name":"${GLOBAL_IP_ADDRESS_NAME}","networkTier":"PREMIUM"}'
{
"kind": "compute#operation",
"id": "760793188359971737",
"name": "operation-1695948149954-60674b3091944-8bdbeb1a-b7b58b8c",
"operationType": "insert",
"targetLink": "https://www.googleapis.com/compute/v1/projects/<project id recacted>/global/addresses/<ip address name redacted>",
"targetId": "408497069976429465",
"status": "RUNNING",
"user": "<email address redadted>",
"progress": 0,
"insertTime": "2023-09-28T17:42:30.350-07:00",
"startTime": "2023-09-28T17:42:30.361-07:00",
"selfLink": "https://www.googleapis.com/compute/v1/projects/<project id redacted>/global/operations/operation-1695948149954-60674b3091944-8bdbeb1a-b7b58b8c"
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @glimberg for the context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like tests are failing from this:
Error: Error creating GlobalAddress: googleapi: Error 400: Invalid value for field 'resource.networkTier': 'PREMIUM'. An address with type INTERNAL cannot have a network tier., invalid
We need to get the condition (external/internal) logic right or just add the field. I'd prefer to just add the field.
I finally was able to get on a call with GCP support on the API's behavior vs. the documentation for the globalAddress endpoint. According to support, the documentation is wrong. When the Adding the field to the |
a07814c
to
1893180
Compare
Tests analyticsTotal tests: Action takenFound 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccContainerNodePool_withKubeletConfig|TestAccContainerCluster_withAddons|TestAccContainerNodePool_withUpgradeSettings |
|
Fixes hashicorp/terraform-provider-google#15982
Release Note Template for Downstream PRs (will be copied)