Skip to content

Commit 598701c

Browse files
authored
Merge pull request #123 from danistrebel/fix/apigee-org-reference-psc-sb
Fix/apigee org reference psc sb
2 parents a92986d + 93cd8e9 commit 598701c

File tree

21 files changed

+10
-111
lines changed

21 files changed

+10
-111
lines changed

modules/apigee-x-core/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Apigee Core Setup
22

33
<!-- BEGIN_TF_DOCS -->
4-
54
## Providers
65

76
| Name | Version |
@@ -48,6 +47,6 @@
4847
| <a name="output_instance_endpoints"></a> [instance\_endpoints](#output\_instance\_endpoints) | Map of instance name -> internal runtime endpoint IP address |
4948
| <a name="output_instance_map"></a> [instance\_map](#output\_instance\_map) | Map of instance region -> instance object |
5049
| <a name="output_instance_service_attachments"></a> [instance\_service\_attachments](#output\_instance\_service\_attachments) | Map of instance region -> instance PSC service attachment |
51-
| <a name="output_org_id"></a> [org\_id](#output\_org\_id) | Apigee Organization ID |
50+
| <a name="output_org_id"></a> [org\_id](#output\_org\_id) | Apigee Organization ID in the format of 'organizations/<org\_id>' |
5251
| <a name="output_organization"></a> [organization](#output\_organization) | Apigee Organization. |
5352
<!-- END_TF_DOCS -->

modules/apigee-x-core/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ output "instance_map" {
3636
}
3737

3838
output "org_id" {
39-
description = "Apigee Organization ID"
39+
description = "Apigee Organization ID in the format of 'organizations/<org_id>'"
4040
value = module.apigee.org_id
4141
}
4242

modules/development-backend/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@
3737
| <a name="output_ilb_forwarding_rule_address"></a> [ilb\_forwarding\_rule\_address](#output\_ilb\_forwarding\_rule\_address) | ILB forwarding rule IP address. |
3838
| <a name="output_ilb_forwarding_rule_self_link"></a> [ilb\_forwarding\_rule\_self\_link](#output\_ilb\_forwarding\_rule\_self\_link) | ILB forwarding rule self link. |
3939
| <a name="output_instance_group"></a> [instance\_group](#output\_instance\_group) | Backend Service MIG. |
40+
| <a name="output_region"></a> [region](#output\_region) | Backend Service region. |
4041
<!-- END_TF_DOCS -->

modules/nb-psc-l7ilb/README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
<!-- BEGIN_TF_DOCS -->
2-
# Apigee X L7 ILB PSC NEG Northbound Module
3-
4-
## Requirements
5-
6-
| Name | Version |
7-
|------|---------|
8-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.1.0 |
9-
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.32.0 |
10-
| <a name="requirement_google-beta"></a> [google-beta](#requirement\_google-beta) | >= 4.32.0 |
11-
122
## Providers
133

144
| Name | Version |

modules/sb-psc-attachment/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ No modules.
2020

2121
| Name | Description | Type | Default | Required |
2222
|------|-------------|------|---------|:--------:|
23-
| <a name="input_apigee_organization"></a> [apigee\_organization](#input\_apigee\_organization) | Apigee organization where the Endpoint Attachment should be added to. | `string` | n/a | yes |
23+
| <a name="input_apigee_organization"></a> [apigee\_organization](#input\_apigee\_organization) | Apigee organization where the Endpoint Attachment should be added to. Apigee Organization ID should be prefixed with 'organizations/' | `string` | n/a | yes |
2424
| <a name="input_name"></a> [name](#input\_name) | Name for the service attachment. | `string` | n/a | yes |
2525
| <a name="input_nat_subnets"></a> [nat\_subnets](#input\_nat\_subnets) | One or more NAT subnets to be used for PSC. | `list(string)` | n/a | yes |
2626
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | Project id. | `string` | n/a | yes |

modules/sb-psc-attachment/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ resource "google_compute_service_attachment" "psc_service_attachment" {
2727
}
2828

2929
resource "google_apigee_endpoint_attachment" "endpoint_attachment" {
30-
org_id = "organizations/${var.apigee_organization}"
30+
org_id = var.apigee_organization
3131
endpoint_attachment_id = var.name
3232
location = var.region
3333
service_attachment = google_compute_service_attachment.psc_service_attachment.id

modules/sb-psc-attachment/variables.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ variable "target_service" {
4040
}
4141

4242
variable "apigee_organization" {
43-
description = "Apigee organization where the Endpoint Attachment should be added to."
43+
description = "Apigee organization where the Endpoint Attachment should be added to. Apigee Organization ID should be prefixed with 'organizations/'"
4444
type = string
45+
validation {
46+
condition = can(regex("^(organizations/[a-zA-Z0-9-_]+)$", var.apigee_organization))
47+
error_message = "Invalid Apigee Organization ID. Please use the format \"organizations/[a-zA-Z0-9-_]+\"."
48+
}
4549
}

samples/hybrid-gke/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,6 @@ curl -kv --resolve $INGRESS_DOMAIN:443:$INGRESS_IP "https://$INGRESS_DOMAIN/my-p
170170
* Implement CD for TF and k8s resources
171171

172172
<!-- BEGIN_TF_DOCS -->
173-
## Requirements
174-
175-
No requirements.
176-
177173
## Providers
178174

179175
| Name | Version |

samples/x-basic/README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ Please see the main [README](https://github.com/apigee/terraform-modules#deployi
66
for detailed instructions.
77

88
<!-- BEGIN_TF_DOCS -->
9-
## Requirements
10-
11-
No requirements.
12-
139
## Providers
1410

1511
No providers.
@@ -45,8 +41,4 @@ No resources.
4541
## Outputs
4642

4743
No outputs.
48-
49-
## Copyright
50-
51-
Copyright 2023 Google LLC. This software is provided as-is, without warranty or representation for any use or purpose. Your use of it is subject to your agreement with Google.
5244
<!-- END_TF_DOCS -->

samples/x-controlled-internet-egress/README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ Please see the main [README](https://github.com/apigee/terraform-modules#deployi
1919
for detailed instructions.
2020

2121
<!-- BEGIN_TF_DOCS -->
22-
## Requirements
23-
24-
No requirements.
25-
2622
## Providers
2723

2824
| Name | Version |
@@ -69,7 +65,4 @@ No requirements.
6965
## Outputs
7066

7167
No outputs.
72-
73-
## Copyright
74-
Copyright 2023 Google LLC. This software is provided as-is, without warranty or representation for any use or purpose. Your use of it is subject to your agreement with Google.
7568
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)