Skip to content

Commit 286e36d

Browse files
committed
refactored space to space_id
1 parent 78f47f7 commit 286e36d

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
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_sharedflow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ func resourceApigeeSharedFlowDelete(d *schema.ResourceData, meta interface{}) er
349349
}
350350

351351
func resourceApigeeSharedFlowImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
352-
352+
353353
var id string
354354
var err error
355355

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

Lines changed: 3 additions & 3 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{}{
@@ -24,7 +24,7 @@ func TestAccApigeeSpace_handwritten(t *testing.T) {
2424
CheckDestroy: testAccCheckApigeeSpaceDestroyProducer(t),
2525
Steps: []resource.TestStep{
2626
{
27-
Config: testAccApigeeSpace_handwrittenConfig(context),
27+
Config: testAccApigeeSpace_basicTest(context),
2828
},
2929
{
3030
ResourceName: "google_apigee_space.primary",
@@ -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}"

mmv1/third_party/terraform/website/docs/r/apigee_api.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The following arguments are supported:
5353
(Required)
5454
Path to the config zip bundle.
5555

56-
* `space_id` -
56+
* `space` -
5757
(Optional)
5858
The id of the space.
5959

mmv1/third_party/terraform/website/docs/r/apigee_sharedflow.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The following arguments are supported:
3434
(Required)
3535
Path to the config zip bundle.
3636

37-
* `space_id` -
37+
* `space` -
3838
(Optional)
3939
The id of the space.
4040

0 commit comments

Comments
 (0)