hashicorp / terraform-provider-google

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

Add support for nodeConfig in ApigeeEnvironment #12218

Closed xuchenma closed 2 years ago

xuchenma commented 2 years ago

Community Note

Description

A new field "NodeConfig" is introduced to ApigeeEnvironment. Sample usage:

Creating an Environment

curl "https://apigee.googleapis.com/v1/organizations/$ORG_ID/environments" \
  -H "$AUTH" \
  -X POST \
  -H "Content-Type:application/json" \
  -d '{
    "name":"'"$ENVIRONMENT_NAME"'",
    "nodeConfig": {
        "minNodeCount":"'"$MIN_NODE_COUNT"'",
        "minNodeCount":"'"$MAX_NODE_COUNT"'",
    }
  }'

Modifying an existing Environment

curl -s "https://apigee.googleapis.com/v1/organizations/$ORG_ID/environments/$ENVIRONMENT_NAME?updateMask=node_config" \
  -H "$AUTH" \
  -X PATCH \
  -H "Content-Type:application/json" \
  -d '{                                                           
     "nodeConfig": {
        "minNodeCount":"'"$MIN_NODE_COUNT"'",
        "minNodeCount":"'"$MAX_NODE_COUNT"'",
     }
  }'

Read Node Usage for an Environment

curl -s -H "$AUTH" "https://apigee.googleapis.com/v1/organizations/${ORG_ID}/environments/test" 
{
  "name": "test",
  "createdAt": "1641850958094",
  "lastModifiedAt": "1642706641741",
  "displayName": "test",
  "state": "ACTIVE",
  "deploymentType": "PROXY",
  "apiProxyType": "PROGRAMMABLE",
  "nodeConfig": {
    "minNodeCount": "3",
    "maxNodeCount": "5",
    "currentAggregateNodeCount": "6"
  }
}

New or Affected Resource(s)

Potential Terraform Configuration

# Propose what you think the configuration to take advantage of this feature should look like.
# We may not use it verbatim, but it's helpful in understanding your intent.

References

github-actions[bot] commented 1 year ago

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