Skip to content

Commit 38a5411

Browse files
committed
refactored space to space_id
1 parent 78f47f7 commit 38a5411

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

mmv1/products/apigee/Space.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import_format:
2727
- "{{org_id}}/{{name}}"
2828
iam_policy:
2929
method_name_separator: ':'
30-
parent_resource_attribute: 'space'
30+
parent_resource_attribute: 'space_id'
3131
fetch_iam_policy_verb: 'GET'
3232
set_iam_policy_verb: 'POST'
3333
wrapped_policy_obj: false
@@ -60,7 +60,7 @@ properties:
6060
- name: "name"
6161
type: String
6262
description: |
63-
Identifier. Id of the space.
63+
Identifier. Id of the space.
6464
This field is used as the resource name, and must follow AIP-122 guidelines.
6565
output: true
6666
- name: "displayName"

mmv1/templates/terraform/examples/apigee_api_product_space.tf.tmpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ resource "google_apigee_instance" "apigee_instance" {
3434

3535
resource "google_apigee_space" "space" {
3636
org_id = google_apigee_organization.apigee_org.id
37-
name = "{{index $.Vars "space_name"}}"
37+
space_id = "{{index $.Vars "space_name"}}"
38+
name = "organizations/${google_apigee_organization.apigee_org.name}/spaces/{{index $.Vars "space_name"}}"
3839
display_name = "{{index $.Vars "space_display_name"}}"
3940
}
4041

4142
resource "google_apigee_api_product" "space_api_product" {
4243
org_id = google_apigee_organization.apigee_org.id
43-
space = google_apigee_space.space.name
44+
space = google_apigee_space.space.space_id
4445
name = "{{index $.Vars "product_name"}}"
4546
display_name = "My Space API Product"
4647

mmv1/third_party/terraform/services/apigee/resource_apigee_space_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/hashicorp/terraform-provider-google/google/envvar"
99
)
1010

11-
func TestAccApigeeSpace_handwritten(t *testing.T) {
11+
func TestAccApigeeSpace_basicTest(t *testing.T) {
1212
t.Parallel()
1313

1414
context := map[string]interface{}{
@@ -35,7 +35,7 @@ func TestAccApigeeSpace_handwritten(t *testing.T) {
3535
})
3636
}
3737

38-
func testAccApigeeSpace_handwrittenConfig(context map[string]interface{}) string {
38+
func testAccApigeeSpace_basicTest(context map[string]interface{}) string {
3939
return acctest.Nprintf(`
4040
resource "google_project" "project" {
4141
project_id = "%{org_id}-%{space_name}"

0 commit comments

Comments
 (0)