-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: preserve manually added connections fields (#2530)
Co-authored-by: Bharath KKB <[email protected]>
- Loading branch information
1 parent
cef8144
commit 3adea87
Showing
7 changed files
with
325 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
cli/testdata/bpmetadata/metadata/existing_interfaces_with_one_connection_metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
apiVersion: blueprints.cloud.google.com/v1alpha1 | ||
kind: BlueprintMetadata | ||
metadata: | ||
name: terraform-google-memorystore | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
spec: | ||
info: | ||
title: Google Cloud Memorystore Terraform Module | ||
source: | ||
repo: https://github.com/terraform-google-modules/terraform-google-memorystore.git | ||
sourceType: git | ||
version: 10.0.0 | ||
actuationTool: | ||
flavor: Terraform | ||
version: ">= 0.13" | ||
description: {} | ||
content: | ||
subBlueprints: | ||
- name: memcache | ||
location: modules/memcache | ||
- name: redis-cluster | ||
location: modules/redis-cluster | ||
examples: | ||
- name: basic | ||
location: examples/basic | ||
- name: memcache | ||
location: examples/memcache | ||
- name: minimal | ||
location: examples/minimal | ||
- name: redis | ||
location: examples/redis | ||
- name: redis-cluster | ||
location: examples/redis-cluster | ||
interfaces: | ||
variables: | ||
- name: auth_enabled | ||
description: Indicates whether OSS Redis AUTH is enabled for the instance. If set to true AUTH is enabled on the instance. | ||
varType: bool | ||
defaultValue: false | ||
- name: authorized_network | ||
description: The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. | ||
varType: string | ||
connections: | ||
- source: | ||
source: github.com/terraform-google-modules/terraform-google-network//modules/vpc | ||
version: v9.1.0 | ||
spec: | ||
outputExpr: network_name | ||
- name: customer_managed_key | ||
description: Default encryption key to apply to the Redis instance. Defaults to null (Google-managed). | ||
varType: string | ||
requirements: | ||
roles: | ||
- level: Project | ||
roles: | ||
- roles/owner | ||
services: | ||
- cloudresourcemanager.googleapis.com | ||
- serviceusage.googleapis.com | ||
- redis.googleapis.com | ||
- memcache.googleapis.com | ||
- serviceconsumermanagement.googleapis.com | ||
- networkconnectivity.googleapis.com | ||
- compute.googleapis.com |
76 changes: 76 additions & 0 deletions
76
cli/testdata/bpmetadata/metadata/existing_interfaces_with_some_connections_metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
apiVersion: blueprints.cloud.google.com/v1alpha1 | ||
kind: BlueprintMetadata | ||
metadata: | ||
name: terraform-google-memorystore | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
spec: | ||
info: | ||
title: Google Cloud Memorystore Terraform Module | ||
source: | ||
repo: https://github.com/terraform-google-modules/terraform-google-memorystore.git | ||
sourceType: git | ||
version: 10.0.0 | ||
actuationTool: | ||
flavor: Terraform | ||
version: ">= 0.13" | ||
description: {} | ||
content: | ||
subBlueprints: | ||
- name: memcache | ||
location: modules/memcache | ||
- name: redis-cluster | ||
location: modules/redis-cluster | ||
examples: | ||
- name: basic | ||
location: examples/basic | ||
- name: memcache | ||
location: examples/memcache | ||
- name: minimal | ||
location: examples/minimal | ||
- name: redis | ||
location: examples/redis | ||
- name: redis-cluster | ||
location: examples/redis-cluster | ||
interfaces: | ||
variables: | ||
- name: auth_enabled | ||
description: Indicates whether OSS Redis AUTH is enabled for the instance. If set to true AUTH is enabled on the instance. | ||
varType: bool | ||
defaultValue: false | ||
- name: authorized_network | ||
description: The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. | ||
varType: string | ||
connections: | ||
- source: | ||
source: github.com/terraform-google-modules/terraform-google-network//modules/vpc | ||
version: v9.1.0 | ||
spec: | ||
outputExpr: network_name | ||
- source: | ||
source: github.com/terraform-google-modules/terraform-google-vpc-service-controls//modules/access_level | ||
version: v6.0.0 | ||
spec: | ||
outputExpr: network_acl_name | ||
- name: customer_managed_key | ||
description: Default encryption key to apply to the Redis instance. Defaults to null (Google-managed). | ||
varType: string | ||
connections: | ||
- source: | ||
source: github.com/terraform-google-modules/terraform-google-kms | ||
version: v2.3.0 | ||
spec: | ||
outputExpr: kms_name | ||
requirements: | ||
roles: | ||
- level: Project | ||
roles: | ||
- roles/owner | ||
services: | ||
- cloudresourcemanager.googleapis.com | ||
- serviceusage.googleapis.com | ||
- redis.googleapis.com | ||
- memcache.googleapis.com | ||
- serviceconsumermanagement.googleapis.com | ||
- networkconnectivity.googleapis.com | ||
- compute.googleapis.com |
59 changes: 59 additions & 0 deletions
59
cli/testdata/bpmetadata/metadata/existing_interfaces_without_connections_metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
apiVersion: blueprints.cloud.google.com/v1alpha1 | ||
kind: BlueprintMetadata | ||
metadata: | ||
name: terraform-google-memorystore | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
spec: | ||
info: | ||
title: Google Cloud Memorystore Terraform Module | ||
source: | ||
repo: https://github.com/terraform-google-modules/terraform-google-memorystore.git | ||
sourceType: git | ||
version: 10.0.0 | ||
actuationTool: | ||
flavor: Terraform | ||
version: ">= 0.13" | ||
description: {} | ||
content: | ||
subBlueprints: | ||
- name: memcache | ||
location: modules/memcache | ||
- name: redis-cluster | ||
location: modules/redis-cluster | ||
examples: | ||
- name: basic | ||
location: examples/basic | ||
- name: memcache | ||
location: examples/memcache | ||
- name: minimal | ||
location: examples/minimal | ||
- name: redis | ||
location: examples/redis | ||
- name: redis-cluster | ||
location: examples/redis-cluster | ||
interfaces: | ||
variables: | ||
- name: auth_enabled | ||
description: Indicates whether OSS Redis AUTH is enabled for the instance. If set to true AUTH is enabled on the instance. | ||
varType: bool | ||
defaultValue: false | ||
- name: authorized_network | ||
description: The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. | ||
varType: string | ||
- name: customer_managed_key | ||
description: Default encryption key to apply to the Redis instance. Defaults to null (Google-managed). | ||
varType: string | ||
requirements: | ||
roles: | ||
- level: Project | ||
roles: | ||
- roles/owner | ||
services: | ||
- cloudresourcemanager.googleapis.com | ||
- serviceusage.googleapis.com | ||
- redis.googleapis.com | ||
- memcache.googleapis.com | ||
- serviceconsumermanagement.googleapis.com | ||
- networkconnectivity.googleapis.com | ||
- compute.googleapis.com |
59 changes: 59 additions & 0 deletions
59
cli/testdata/bpmetadata/metadata/new_interfaces_no_connections_metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
apiVersion: blueprints.cloud.google.com/v1alpha1 | ||
kind: BlueprintMetadata | ||
metadata: | ||
name: terraform-google-memorystore | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
spec: | ||
info: | ||
title: Google Cloud Memorystore Terraform Module | ||
source: | ||
repo: https://github.com/terraform-google-modules/terraform-google-memorystore.git | ||
sourceType: git | ||
version: 10.0.0 | ||
actuationTool: | ||
flavor: Terraform | ||
version: ">= 0.13" | ||
description: {} | ||
content: | ||
subBlueprints: | ||
- name: memcache | ||
location: modules/memcache | ||
- name: redis-cluster | ||
location: modules/redis-cluster | ||
examples: | ||
- name: basic | ||
location: examples/basic | ||
- name: memcache | ||
location: examples/memcache | ||
- name: minimal | ||
location: examples/minimal | ||
- name: redis | ||
location: examples/redis | ||
- name: redis-cluster | ||
location: examples/redis-cluster | ||
interfaces: | ||
variables: | ||
- name: auth_enabled | ||
description: Indicates whether OSS Redis AUTH is enabled for the instance. If set to true AUTH is enabled on the instance. | ||
varType: bool | ||
defaultValue: false | ||
- name: authorized_network | ||
description: The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. | ||
varType: string | ||
- name: customer_managed_key | ||
description: Default encryption key to apply to the Redis instance. Defaults to null (Google-managed). | ||
varType: string | ||
requirements: | ||
roles: | ||
- level: Project | ||
roles: | ||
- roles/owner | ||
services: | ||
- cloudresourcemanager.googleapis.com | ||
- serviceusage.googleapis.com | ||
- redis.googleapis.com | ||
- memcache.googleapis.com | ||
- serviceconsumermanagement.googleapis.com | ||
- networkconnectivity.googleapis.com | ||
- compute.googleapis.com |