Skip to content

Commit

Permalink
fix: update cloud run tflint (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathkkb authored Feb 3, 2023
1 parent 3b252d9 commit 3d72db5
Show file tree
Hide file tree
Showing 22 changed files with 410 additions and 187 deletions.
8 changes: 6 additions & 2 deletions metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Google LLC
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -21,7 +21,7 @@ metadata:
spec:
title: Google IAM Terraform Module
source:
repo: /~https://github.com/terraform-google-modules/terraform-google-iam.git
repo: /~https://github.com/terraform-google-modules/terraform-google-iam/
sourceType: git
subBlueprints:
- name: artifact_registry_iam
Expand All @@ -32,6 +32,8 @@ spec:
location: modules/bigquery_datasets_iam
- name: billing_accounts_iam
location: modules/billing_accounts_iam
- name: cloud_run_services_iam
location: modules/cloud_run_services_iam
- name: custom_role_iam
location: modules/custom_role_iam
- name: folders_iam
Expand Down Expand Up @@ -65,6 +67,8 @@ spec:
location: examples/bigquery_dataset
- name: billing_account
location: examples/billing_account
- name: cloud_run_service
location: examples/cloud_run_service
- name: custom_role_org
location: examples/custom_role_org
- name: custom_role_project
Expand Down
8 changes: 5 additions & 3 deletions modules/artifact_registry_iam/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Google LLC
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -21,9 +21,9 @@ metadata:
spec:
title: Module Artifact registry repository IAM
source:
repo: /~https://github.com/terraform-google-modules/terraform-google-iam.git
repo: /~https://github.com/terraform-google-modules/terraform-google-iam/
sourceType: git
version: 7.4.1
version: 7.5.0
actuationTool:
type: Terraform
version: '>= 0.13'
Expand All @@ -32,6 +32,8 @@ spec:
location: examples/bigquery_dataset
- name: billing_account
location: examples/billing_account
- name: cloud_run_service
location: examples/cloud_run_service
- name: custom_role_org
location: examples/custom_role_org
- name: custom_role_project
Expand Down
14 changes: 8 additions & 6 deletions modules/audit_config/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Google LLC
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -21,9 +21,9 @@ metadata:
spec:
title: Module audit_config
source:
repo: /~https://github.com/terraform-google-modules/terraform-google-iam.git
repo: /~https://github.com/terraform-google-modules/terraform-google-iam/
sourceType: git
version: 7.4.1
version: 7.5.0
actuationTool:
type: Terraform
version: '>= 0.13'
Expand All @@ -32,6 +32,8 @@ spec:
location: examples/bigquery_dataset
- name: billing_account
location: examples/billing_account
- name: cloud_run_service
location: examples/cloud_run_service
- name: custom_role_org
location: examples/custom_role_org
- name: custom_role_project
Expand Down Expand Up @@ -77,6 +79,9 @@ spec:
- name: audit_log_config
description: Map of log type and exempted members to be added to service
roles:
- level: Project
roles:
- roles/billing.user
- level: Project
roles:
- roles/billing.admin
Expand Down Expand Up @@ -106,9 +111,6 @@ spec:
- roles/owner
- roles/billing.projectManager
- roles/composer.worker
- level: Project
roles:
- roles/billing.user
services:
- admin.googleapis.com
- appengine.googleapis.com
Expand Down
24 changes: 13 additions & 11 deletions modules/bigquery_datasets_iam/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Google LLC
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -21,9 +21,9 @@ metadata:
spec:
title: Module bigquery_datasets IAM
source:
repo: /~https://github.com/terraform-google-modules/terraform-google-iam.git
repo: /~https://github.com/terraform-google-modules/terraform-google-iam/
sourceType: git
version: 7.4.1
version: 7.5.0
actuationTool:
type: Terraform
version: '>= 0.13'
Expand All @@ -32,6 +32,8 @@ spec:
location: examples/bigquery_dataset
- name: billing_account
location: examples/billing_account
- name: cloud_run_service
location: examples/cloud_run_service
- name: custom_role_org
location: examples/custom_role_org
- name: custom_role_project
Expand Down Expand Up @@ -90,14 +92,6 @@ spec:
- name: roles
description: Roles which were assigned to members.
roles:
- level: Project
roles:
- roles/resourcemanager.projectCreator
- roles/resourcemanager.folderAdmin
- roles/resourcemanager.folderIamAdmin
- roles/owner
- roles/billing.projectManager
- roles/composer.worker
- level: Project
roles:
- roles/billing.user
Expand All @@ -122,6 +116,14 @@ spec:
- roles/storage.admin
- roles/composer.worker
- roles/secretmanager.admin
- level: Project
roles:
- roles/resourcemanager.projectCreator
- roles/resourcemanager.folderAdmin
- roles/resourcemanager.folderIamAdmin
- roles/owner
- roles/billing.projectManager
- roles/composer.worker
services:
- admin.googleapis.com
- appengine.googleapis.com
Expand Down
36 changes: 19 additions & 17 deletions modules/billing_accounts_iam/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Google LLC
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -21,9 +21,9 @@ metadata:
spec:
title: Module Billing Accounts IAM
source:
repo: /~https://github.com/terraform-google-modules/terraform-google-iam.git
repo: /~https://github.com/terraform-google-modules/terraform-google-iam/
sourceType: git
version: 7.4.1
version: 7.5.0
actuationTool:
type: Terraform
version: '>= 0.13'
Expand All @@ -32,6 +32,8 @@ spec:
location: examples/bigquery_dataset
- name: billing_account
location: examples/billing_account
- name: cloud_run_service
location: examples/cloud_run_service
- name: custom_role_org
location: examples/custom_role_org
- name: custom_role_project
Expand Down Expand Up @@ -87,6 +89,20 @@ spec:
- name: roles
description: Roles which were assigned to members.
roles:
- level: Project
roles:
- roles/resourcemanager.projectCreator
- roles/resourcemanager.folderAdmin
- roles/resourcemanager.folderIamAdmin
- roles/owner
- roles/billing.projectManager
- roles/composer.worker
- level: Project
roles:
- roles/billing.user
- level: Project
roles:
- roles/billing.admin
- level: Project
roles:
- roles/iam.organizationRoleAdmin
Expand All @@ -105,20 +121,6 @@ spec:
- roles/storage.admin
- roles/composer.worker
- roles/secretmanager.admin
- level: Project
roles:
- roles/resourcemanager.projectCreator
- roles/resourcemanager.folderAdmin
- roles/resourcemanager.folderIamAdmin
- roles/owner
- roles/billing.projectManager
- roles/composer.worker
- level: Project
roles:
- roles/billing.user
- level: Project
roles:
- roles/billing.admin
services:
- admin.googleapis.com
- appengine.googleapis.com
Expand Down
151 changes: 151 additions & 0 deletions modules/cloud_run_services_iam/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: blueprints.cloud.google.com/v1alpha1
kind: BlueprintMetadata
metadata:
name: terraform-google-iam
annotations:
config.kubernetes.io/local-config: "true"
spec:
title: Module Cloud Run Service IAM
source:
repo: /~https://github.com/terraform-google-modules/terraform-google-iam/
sourceType: git
version: 7.5.0
actuationTool:
type: Terraform
version: '>= 0.13'
examples:
- name: bigquery_dataset
location: examples/bigquery_dataset
- name: billing_account
location: examples/billing_account
- name: cloud_run_service
location: examples/cloud_run_service
- name: custom_role_org
location: examples/custom_role_org
- name: custom_role_project
location: examples/custom_role_project
- name: folder
location: examples/folder
- name: kms_crypto_key
location: examples/kms_crypto_key
- name: kms_key_ring
location: examples/kms_key_ring
- name: member_iam
location: examples/member_iam
- name: organization
location: examples/organization
- name: project
location: examples/project
- name: project_conditions
location: examples/project_conditions
- name: pubsub_subscription
location: examples/pubsub_subscription
- name: pubsub_topic
location: examples/pubsub_topic
- name: secret_manager
location: examples/secret_manager
- name: service_account
location: examples/service_account
- name: stackdriver_agent_roles
location: examples/stackdriver_agent_roles
- name: storage_bucket
location: examples/storage_bucket
- name: subnet
location: examples/subnet
variables:
- name: bindings
description: Map of role (key) and list of members (value) to add the IAM policies/bindings
type: map(any)
required: true
- name: cloud_run_services
description: Cloud Run services list to add the IAM policies/bindings
type: list(string)
default: []
required: false
- name: location
description: The location of the cloud run instance
type: string
default: ""
required: false
- name: mode
description: Mode for adding the IAM policies/bindings, additive and authoritative
type: string
default: additive
required: false
- name: project
description: Project to add the IAM policies/bindings
type: string
default: ""
required: false
outputs:
- name: cloud_run_services
description: Cloud Run services which received for bindings.
- name: members
description: Members which were bound to the Cloud Run services.
- name: roles
description: Roles which were assigned to members.
roles:
- level: Project
roles:
- roles/iam.organizationRoleAdmin
- roles/orgpolicy.policyAdmin
- roles/resourcemanager.organizationAdmin
- level: Project
roles:
- roles/owner
- roles/resourcemanager.projectIamAdmin
- roles/iam.serviceAccountAdmin
- roles/compute.admin
- roles/compute.networkAdmin
- roles/compute.storageAdmin
- roles/pubsub.admin
- roles/cloudkms.admin
- roles/storage.admin
- roles/composer.worker
- roles/secretmanager.admin
- level: Project
roles:
- roles/resourcemanager.projectCreator
- roles/resourcemanager.folderAdmin
- roles/resourcemanager.folderIamAdmin
- roles/owner
- roles/billing.projectManager
- roles/composer.worker
- level: Project
roles:
- roles/billing.user
- level: Project
roles:
- roles/billing.admin
services:
- admin.googleapis.com
- appengine.googleapis.com
- cloudbilling.googleapis.com
- cloudresourcemanager.googleapis.com
- compute.googleapis.com
- iam.googleapis.com
- iamcredentials.googleapis.com
- oslogin.googleapis.com
- serviceusage.googleapis.com
- cloudkms.googleapis.com
- pubsub.googleapis.com
- storage-api.googleapis.com
- servicenetworking.googleapis.com
- storage-component.googleapis.com
- iap.googleapis.com
- secretmanager.googleapis.com
- bigquery.googleapis.com
1 change: 1 addition & 0 deletions modules/cloud_run_services_iam/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ variable "cloud_run_services" {

variable "mode" {
description = "Mode for adding the IAM policies/bindings, additive and authoritative"
type = string
default = "additive"
}

Expand Down
Loading

0 comments on commit 3d72db5

Please sign in to comment.