Skip to content

Commit fffd5fe

Browse files
authored
chore: update release config (#113)
## Motivation To reflect the latest folder structure. Signed-off-by: Max Xu <xuhuan@live.cn>
1 parent ec3f23b commit fffd5fe

File tree

4 files changed

+62
-43
lines changed

4 files changed

+62
-43
lines changed

.github/workflows/terraform.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: "TF GH Action"
1+
name: Terraform
2+
23
on:
34
- pull_request
45

@@ -11,12 +12,12 @@ jobs:
1112
runs-on: ubuntu-latest
1213
steps:
1314
- name: Checkout
14-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1516

1617
- name: Setup Terraform
17-
uses: hashicorp/setup-terraform@v1.3.2
18+
uses: hashicorp/setup-terraform@v3
1819
with:
19-
terraform_version: 0.15.x
20+
terraform_version: "1.5.5"
2021

2122
- name: Terraform fmt
2223
run: terraform fmt -recursive -write=false -check -diff .
@@ -27,13 +28,13 @@ jobs:
2728
runs-on: ubuntu-latest
2829
strategy:
2930
matrix:
30-
terraform_version: [1.3.x]
31+
terraform_version: ["1.5.5"]
3132
steps:
3233
- name: Checkout
33-
uses: actions/checkout@v3
34+
uses: actions/checkout@v4
3435

3536
- name: Setup Terraform ${{ matrix.terraform_version }}
36-
uses: hashicorp/setup-terraform@v1.3.2
37+
uses: hashicorp/setup-terraform@v3
3738
with:
3839
terraform_version: ${{ matrix.terraform_version }}
3940

README.md

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,44 @@ More detailed documentation can be viewed in the respective module directory.
2828

2929
Run the following terraform file within your AWS profile:
3030

31+
<!-- x-release-please-start-version -->
3132
```hcl
33+
provider "aws" {
34+
region = <YOUR_REGION>
35+
}
36+
3237
module "sn_managed_cloud" {
33-
source = "github.com/streamnative/terraform-managed-cloud//modules/aws?ref=<LATEST_GIT_TAG>"
38+
source = "github.com/streamnative/terraform-managed-cloud//modules/aws/vendor-access?ref=v3.19.0"
3439
3540
external_id = "<YOUR_SNCLOUD_ORG_ID>"
3641
}
3742
```
43+
<!-- x-release-please-end -->
3844

3945
### Using GCP module
4046

4147
Run the following terraform file within your GCP credentials:
4248

49+
<!-- x-release-please-start-version -->
4350
```hcl
4451
provider "google" {
4552
project = "<YOUR_PROJECT>"
4653
}
4754
4855
module "sn_managed_cloud" {
49-
source = "github.com/streamnative/terraform-managed-cloud//modules/gcp/vendor-access?ref=<LATEST_GIT_TAG>"
56+
source = "github.com/streamnative/terraform-managed-cloud//modules/gcp/vendor-access?ref=v3.19.0"
57+
5058
project = "<YOUR_PROJECT>"
59+
streamnative_org_id = "<YOUR_SNCLOUD_ORG_ID>"
5160
}
5261
```
62+
<!-- x-release-please-end -->
5363

5464
### Using Azure module
5565

5666
Run the following terraform file within your Azure credentials:
5767

68+
<!-- x-release-please-start-version -->
5869
```hcl
5970
provider "azurerm" {
6071
features {
@@ -64,56 +75,56 @@ provider "azurerm" {
6475
6576
provider "azuread" {}
6677
67-
module "azure-sn-cloud-manager" {
68-
source = "github.com/streamnative/terraform-managed-cloud//modules/azure/sn-cloud-manager?ref=<LATEST_GIT_TAG>"
78+
module "sn_cloud_manager" {
79+
source = "github.com/streamnative/terraform-managed-cloud//modules/azure/sn-cloud-manager?ref=v3.19.0"
6980
81+
streamnative_org_id = "<YOUR_SNCLOUD_ORG_ID>"
7082
resource_group_location = "<RESOURCE_GROUP_LOCATION>"
71-
streamnative_org_id = "<YOUR_SNCLOUD_ORG_ID>"
7283
}
7384
74-
module "sn-managed-cloud" {
75-
source = "github.com/streamnative/terraform-managed-cloud//modules/azure/vendor-access?ref=<LATEST_GIT_TAG>"
85+
module "sn_managed_cloud" {
86+
source = "github.com/streamnative/terraform-managed-cloud//modules/azure/vendor-access?ref=v3.19.0"
7687
88+
streamnative_org_id = "<YOUR_SNCLOUD_ORG_ID>"
7789
resource_group_name = "<RESOURCE_GROUP_NAME>"
7890
resource_group_location = "<RESOURCE_GROUP_LOCATION>"
7991
80-
streamnative_org_id = "<YOUR_SNCLOUD_ORG_ID>"
81-
82-
sn_automation_principal_id = module.azure-sn-cloud-manager.sn_automation_principal_id
83-
sn_support_principal_id = module.azure-sn-cloud-manager.sn_support_principal_id
84-
sn_automation_client_id = module.azure-sn-cloud-manager.sn_automation_client_id
85-
sn_support_client_id = module.azure-sn-cloud-manager.sn_support_client_id
92+
sn_automation_principal_id = module.sn_cloud_manager.sn_automation_principal_id
93+
sn_automation_client_id = module.sn_cloud_manager.sn_automation_client_id
94+
sn_support_principal_id = module.sn_cloud_manager.sn_support_principal_id
95+
sn_support_client_id = module.sn_cloud_manager.sn_support_client_id
8696
8797
depends_on = [
88-
module.azure-sn-cloud-manager
98+
module.sn_cloud_manager
8999
]
90100
}
91101
92-
output "client_id" {
93-
value = module.sn-managed-cloud.sn_automation_client_id
94-
description = "The client ID of the sn automation service principal for StreamNative Cloud automation"
95-
}
96-
97-
output "support_client_id" {
98-
value = module.sn-managed-cloud.sn_support_client_id
99-
description = "The client ID of the sn support service principal for StreamNative Cloud support access"
100-
}
101-
102102
output "subscription_id" {
103-
value = module.sn-managed-cloud.subscription_id
103+
value = module.sn_managed_cloud.subscription_id
104104
description = "The subscription ID of the AKS cluster"
105105
}
106106
107107
output "tenant_id" {
108-
value = module.sn-managed-cloud.tenant_id
108+
value = module.sn_managed_cloud.tenant_id
109109
description = "The tenant ID of the AKS cluster"
110110
}
111111
112+
output "client_id" {
113+
value = module.sn_managed_cloud.sn_automation_client_id
114+
description = "The client ID of the sn automation service principal for StreamNative Cloud automation"
115+
}
116+
117+
output "support_client_id" {
118+
value = module.sn_managed_cloud.sn_support_client_id
119+
description = "The client ID of the sn support service principal for StreamNative Cloud support access"
120+
}
121+
112122
output "resource_group_name" {
113-
value = module.sn-managed-cloud.resource_group_name
123+
value = module.sn_managed_cloud.resource_group_name
114124
description = "The name of the resource group where the AKS cluster will be created"
115125
}
116126
```
127+
<!-- x-release-please-end -->
117128

118129
## Examples
119130
Examples of the modules can be found in the `examples` directory.

modules/aws/vendor-access/README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,26 @@ No modules.
120120
| Name | Type |
121121
|------|------|
122122
| [aws_iam_policy.alb_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
123-
| [aws_iam_policy.bootstrap_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
124123
| [aws_iam_policy.management_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
125124
| [aws_iam_policy.permission_boundary](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
125+
| [aws_iam_policy.provision_1_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
126+
| [aws_iam_policy.provision_2_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
127+
| [aws_iam_policy.provision_preserve_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
126128
| [aws_iam_policy.runtime_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
127129
| [aws_iam_role.bootstrap_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
128130
| [aws_iam_role.management_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
129-
| [aws_iam_role_policy_attachment.bootstrap_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
130131
| [aws_iam_role_policy_attachment.bootstrap_readonly](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
131132
| [aws_iam_role_policy_attachment.management_readonly](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
132133
| [aws_iam_role_policy_attachment.management_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
134+
| [aws_iam_role_policy_attachment.provision1_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
135+
| [aws_iam_role_policy_attachment.provision2_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
136+
| [aws_iam_role_policy_attachment.provision_preserve_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
133137
| [local_file.alb_policy](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
134-
| [local_file.bootstrap_policy](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
135138
| [local_file.management_policy](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
136139
| [local_file.permission_boundary_policy](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
140+
| [local_file.provision1_policy](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
141+
| [local_file.provision2_policy](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
142+
| [local_file.provision_preserve_policy](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
137143
| [local_file.runtime_policy](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
138144
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
139145
| [aws_iam_policy_document.streamnative_bootstrap_access](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
@@ -157,17 +163,17 @@ No modules.
157163
| <a name="input_region"></a> [region](#input\_region) | The AWS region where your instance of StreamNative Cloud is deployed. Defaults to all regions "*" | `string` | `"*"` | no |
158164
| <a name="input_s3_bucket_pattern"></a> [s3\_bucket\_pattern](#input\_s3\_bucket\_pattern) | Defines the bucket prefix for streamnative managed buckets (backup and offload). Typically defaults to "snc-*", but should match the bucket created using the tiered-storage-resources module | `string` | `"*snc*"` | no |
159165
| <a name="input_s3_kms_key_arns"></a> [s3\_kms\_key\_arns](#input\_s3\_kms\_key\_arns) | List of KMS key ARNs to use for S3 buckets | `list(string)` | `[]` | no |
160-
| <a name="input_sn_policy_version"></a> [sn\_policy\_version](#input\_sn\_policy\_version) | The value of SNVersion tag | `string` | `"3.14.1"` | no |
166+
| <a name="input_sn_policy_version"></a> [sn\_policy\_version](#input\_sn\_policy\_version) | The value of SNVersion tag | `string` | `"3.16.1"` | no |
161167
| <a name="input_source_identities"></a> [source\_identities](#input\_source\_identities) | Place an additional constraint on source identity, disabled by default and only to be used if specified by StreamNative | `list(any)` | `[]` | no |
162168
| <a name="input_source_identity_test"></a> [source\_identity\_test](#input\_source\_identity\_test) | The test to use for source identity | `string` | `"ForAnyValue:StringLike"` | no |
163169
| <a name="input_streamnative_google_account_id"></a> [streamnative\_google\_account\_id](#input\_streamnative\_google\_account\_id) | (Deprecated, use streamnative\_google\_account\_ids instead) The Google Cloud service account ID used by StreamNative for Control Plane operations | `string` | `"108050666045451143798"` | no |
164-
| <a name="input_streamnative_google_account_ids"></a> [streamnative\_google\_account\_ids](#input\_streamnative\_google\_account\_ids) | The Google Cloud service account IDs used by StreamNative for Control Plane operations | `list(string)` | <pre>[<br> "108050666045451143798"<br>]</pre> | no |
170+
| <a name="input_streamnative_google_account_ids"></a> [streamnative\_google\_account\_ids](#input\_streamnative\_google\_account\_ids) | The Google Cloud service account IDs used by StreamNative for Control Plane operations | `list(string)` | <pre>[<br/> "108050666045451143798"<br/>]</pre> | no |
165171
| <a name="input_streamnative_principal_ids"></a> [streamnative\_principal\_ids](#input\_streamnative\_principal\_ids) | When set, this applies an additional check for certain StreamNative principals to futher restrict access to which services / users can access an account. | `list(string)` | `[]` | no |
166-
| <a name="input_streamnative_support_access_role_arns"></a> [streamnative\_support\_access\_role\_arns](#input\_streamnative\_support\_access\_role\_arns) | A list ARNs provided by StreamNative that enable streamnative support engineers access the StreamNativeCloudBootstrapRole. This is used only in some initial provisioning and in case of on-call support. | `list(string)` | <pre>[<br> "arn:aws:iam::311022431024:role/cloud-support-general"<br>]</pre> | no |
167-
| <a name="input_streamnative_vendor_access_role_arns"></a> [streamnative\_vendor\_access\_role\_arns](#input\_streamnative\_vendor\_access\_role\_arns) | A list ARNs provided by StreamNative that enable us to work with the Vendor Access Roles created by this module (StreamNativeCloudBootstrapRole, StreamNativeCloudManagementRole). This is how StreamNative is granted access into your AWS account, and should typically be the default value unless directed otherwise. This arns are used *only* for automations. | `list(string)` | <pre>[<br> "arn:aws:iam::311022431024:role/cloud-manager"<br>]</pre> | no |
172+
| <a name="input_streamnative_support_access_role_arns"></a> [streamnative\_support\_access\_role\_arns](#input\_streamnative\_support\_access\_role\_arns) | A list ARNs provided by StreamNative that enable streamnative support engineers access the StreamNativeCloudBootstrapRole. This is used only in some initial provisioning and in case of on-call support. | `list(string)` | <pre>[<br/> "arn:aws:iam::311022431024:role/cloud-support-general"<br/>]</pre> | no |
173+
| <a name="input_streamnative_vendor_access_role_arns"></a> [streamnative\_vendor\_access\_role\_arns](#input\_streamnative\_vendor\_access\_role\_arns) | A list ARNs provided by StreamNative that enable us to work with the Vendor Access Roles created by this module (StreamNativeCloudBootstrapRole, StreamNativeCloudManagementRole). This is how StreamNative is granted access into your AWS account, and should typically be the default value unless directed otherwise. This arns are used *only* for automations. | `list(string)` | <pre>[<br/> "arn:aws:iam::311022431024:role/cloud-manager"<br/>]</pre> | no |
168174
| <a name="input_tags"></a> [tags](#input\_tags) | Extra tags to apply to the resources created by this module. | `map(string)` | `{}` | no |
169175
| <a name="input_test_suffix"></a> [test\_suffix](#input\_test\_suffix) | Used in testing to apply us to apply multiple versions of the role | `string` | `""` | no |
170-
| <a name="input_vpc_allowed_ids"></a> [vpc\_allowed\_ids](#input\_vpc\_allowed\_ids) | Allows for further scoping down policy for allowed VPC | `list(any)` | <pre>[<br> "*"<br>]</pre> | no |
176+
| <a name="input_vpc_allowed_ids"></a> [vpc\_allowed\_ids](#input\_vpc\_allowed\_ids) | Allows for further scoping down policy for allowed VPC | `list(any)` | <pre>[<br/> "*"<br/>]</pre> | no |
171177
| <a name="input_write_policy_files"></a> [write\_policy\_files](#input\_write\_policy\_files) | Write the policy files locally to disk for debugging and validation | `bool` | `false` | no |
172178

173179
## Outputs

release-please-config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
".github"
1212
],
1313
"extra-files": [
14-
"modules/aws/variables.tf"
14+
"README.md",
15+
"modules/aws/vendor-access/variables.tf"
1516
]
1617
}
1718
}

0 commit comments

Comments
 (0)