Skip to content

Commit 2154aee

Browse files
feat!: add Terraform 0.13 constraint and module attribution (#22)
* feat!: add Terraform 0.13 constraint and module attribution * Add readme for submoudle and bump version numbers Co-authored-by: James Duncan <[email protected]>
1 parent ac136ed commit 2154aee

File tree

8 files changed

+78
-8
lines changed

8 files changed

+78
-8
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Make will use bash instead of sh
1919
SHELL := /usr/bin/env bash
2020

21-
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.12.2
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.13
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424

build/int.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ tags:
3838
- 'integration'
3939
substitutions:
4040
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
41-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.12.2'
41+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'

build/lint.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ tags:
2121
- 'lint'
2222
substitutions:
2323
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
24-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.12.2'
24+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
2+
## Inputs
3+
4+
| Name | Description | Type | Default | Required |
5+
|------|-------------|------|---------|:--------:|
6+
| admin\_enabled | Whether the VLAN attachment is enabled or disabled | `bool` | `true` | no |
7+
| bandwidth | Provisioned bandwidth capacity for the interconnect attachment | `string` | `"BPS_10G"` | no |
8+
| candidate\_subnets | Up to 16 candidate prefixes that can be used to restrict the allocation of cloudRouterIpAddress and customerRouterIpAddress for this attachment. All prefixes must be within link-local address space (169.254.0.0/16) and must be /29 or shorter (/28, /27, etc). | `list(string)` | `null` | no |
9+
| description | An optional description of this resource | `string` | `null` | no |
10+
| interconnect | URL of the underlying Interconnect object that this attachment's traffic will traverse through. | `string` | n/a | yes |
11+
| interface | Interface to deploy for this attachment. | `any` | n/a | yes |
12+
| name | The name of the interconnect attachment | `string` | n/a | yes |
13+
| peer | BGP Peer for this attachment. | `any` | n/a | yes |
14+
| project | The project ID to deploy to | `string` | n/a | yes |
15+
| region | Region where the attachment resides | `string` | n/a | yes |
16+
| router | Name of the router the attachment resides | `string` | n/a | yes |
17+
| type | The type of InterconnectAttachment you wish to create | `string` | `"DEDICATED"` | no |
18+
| vlan\_tag8021q | The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. | `string` | `null` | no |
19+
20+
## Outputs
21+
22+
| Name | Description |
23+
|------|-------------|
24+
| attachment | The created attachment |
25+
| customer\_router\_ip\_address | IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment. |
26+
27+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
/**
3+
* Copyright 2021 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
terraform {
19+
required_version = ">= 0.13"
20+
required_providers {
21+
22+
google = {
23+
source = "hashicorp/google"
24+
version = "~> 3.53"
25+
}
26+
}
27+
28+
provider_meta "google" {
29+
module_name = "blueprints/terraform/terraform-google-cloud-router:interconnect_attachment/v1.0.0"
30+
}
31+
}

test/setup/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
module "project" {
1818
source = "terraform-google-modules/project-factory/google"
19-
version = "~> 9.0.0"
19+
version = "~> 10.2"
2020

2121
name = "ci-cloud-router"
2222
random_project_id = "true"

test/setup/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ terraform {
1919
}
2020

2121
provider "google" {
22-
version = "~> 3.36.0"
22+
version = "~> 3.53.0"
2323
}
2424

2525
provider "google-beta" {
26-
version = "~> 3.36.0"
26+
version = "~> 3.53.0"
2727
}

versions.tf

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018 Google LLC
2+
* Copyright 2021 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,5 +15,17 @@
1515
*/
1616

1717
terraform {
18-
required_version = ">=0.12"
18+
required_version = ">= 0.13"
19+
required_providers {
20+
21+
google = {
22+
source = "hashicorp/google"
23+
version = "~> 3.53"
24+
}
25+
}
26+
27+
provider_meta "google" {
28+
module_name = "blueprints/terraform/terraform-google-cloud-router/v1.0.0"
29+
}
30+
1931
}

0 commit comments

Comments
 (0)