Skip to content

Commit cbd1a80

Browse files
Added google_apigee_api_proxy_deployment resource (#15227)
1 parent 65ace4b commit cbd1a80

File tree

3 files changed

+430
-0
lines changed

3 files changed

+430
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Copyright 2025 Google Inc.
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
14+
---
15+
name: 'EnvironmentApiRevisionDeployment'
16+
description: |
17+
Deploys a specific Apigee API Proxy revision to a given Apigee environment.
18+
references:
19+
guides:
20+
'Deploying an API proxy': 'https://cloud.google.com/apigee/docs/api-platform/deploy/ui-deploy-new#apigee-api'
21+
api: 'https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.apis.revisions.deployments/deploy'
22+
base_url: 'organizations/{{org_id}}/environments/{{environment}}/apis/{{api}}/revisions/{{revision}}/deployments'
23+
self_link: 'organizations/{{org_id}}/environments/{{environment}}/apis/{{api}}/revisions/{{revision}}/deployments'
24+
immutable: true
25+
create_url: 'organizations/{{org_id}}/environments/{{environment}}/apis/{{api}}/revisions/{{revision}}/deployments?override={{override}}&sequencedRollout={{sequenced_rollout}}&serviceAccount={{service_account}}'
26+
delete_url: 'organizations/{{org_id}}/environments/{{environment}}/apis/{{api}}/revisions/{{revision}}/deployments'
27+
autogen_async: false
28+
id_format: 'organizations/{{org_id}}/environments/{{environment}}/apis/{{api}}/revisions/{{revision}}'
29+
import_format:
30+
- 'organizations/{{org_id}}/environments/{{environment}}/apis/{{api}}/revisions/{{revision}}'
31+
- '{{id}}'
32+
examples:
33+
- name: "apigee_environment_api_revision_deployment_basic"
34+
primary_resource_id: "proxy_deployment_basic"
35+
vars:
36+
apigee_org: "my-org"
37+
exclude_test: true
38+
parameters:
39+
- name: 'org_id'
40+
type: String
41+
required: true
42+
url_param_only: true
43+
description: 'Apigee organization ID.'
44+
- name: 'environment'
45+
type: String
46+
required: true
47+
url_param_only: true
48+
description: 'Apigee environment name.'
49+
- name: 'api'
50+
type: String
51+
required: true
52+
url_param_only: true
53+
description: 'Apigee API proxy name.'
54+
- name: 'revision'
55+
type: Integer
56+
required: true
57+
url_param_only: true
58+
description: 'API proxy revision number to deploy.'
59+
properties:
60+
- name: 'override'
61+
type: Boolean
62+
description: 'If true, replaces other deployed revisions of this proxy in the environment.'
63+
default_value: false
64+
url_param_only: true
65+
- name: 'sequenced_rollout'
66+
type: Boolean
67+
description: 'If true, enables sequenced rollout for safe traffic switching.'
68+
default_value: false
69+
url_param_only: true
70+
- name: 'service_account'
71+
type: String
72+
description: 'Optional service account the deployed proxy runs as.'
73+
url_param_only: true
74+
- name: 'state'
75+
type: String
76+
output: true
77+
description: 'Deployment state reported by Apigee.'
78+
- name: 'basepaths'
79+
type: Array
80+
item_type:
81+
type: String
82+
output: true
83+
api_name: 'basePath'
84+
description: 'Basepaths associated with the deployed proxy.'
85+
- name: 'deployStartTime'
86+
type: String
87+
output: true
88+
description: 'RFC3339 timestamp when deployment started.'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
resource "google_apigee_environment_api_revision_deployment" "{{$.PrimaryResourceId}}" {
2+
org_id = "{{index $.Vars "apigee_org"}}"
3+
environment = "dev"
4+
api = "hello-proxy"
5+
revision = 1
6+
override = true
7+
sequenced_rollout = true
8+
}

0 commit comments

Comments
 (0)