Skip to content

Latest commit

 

History

History

google_cloud_run_v2_job_iam

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Build Status GitHub tag (latest SemVer) Terraform Version Google Provider Version Join Discord

Google Cloud Run V2 Job IAM Terraform Module

A Terraform module to create a Google Cloud Run V2 Job IAM on Google Cloud Services (GCP).

This module supports Terraform version 1 and is compatible with the Terraform Google Provider version 4.

This module is part of our Infrastructure as Code (IaC) framework that enables our users and customers to easily deploy and manage reusable, secure, and production-grade cloud infrastructure.

Module Features

This module implements the following Terraform resources:

  • google_cloud_run_v2_job_iam_binding
  • google_cloud_run_v2_job_iam_member
  • google_cloud_run_v2_job_iam_policy

Getting Started

Most common usage of the module:

module "google_cloud_run_v2_job_iam" {
  source = "github.com/mineiros-io/terraform-google-iam//modules/google/google_cloud_run_v2_job_iam?ref=v0.1.3"

  name  = google_cloud_run_v2_job.default.name
  location = google_cloud_run_v2_job.default.location
  role     = "roles/run.admin"
  members  = ["user:admin@example.com"]
}

Module Argument Reference

See variables.tf for details.

Top-level Arguments

Main Resource Configuration

  • name: (Required string)

    Name of Cloud Run V2 Job resource the IAM is applied to.

  • location: (Required string)

    The location used to find the parent resource to bind the IAM policy to

  • members: (Optional set(string))

    Identities that will be granted the privilege in role. Each entry can have one of the following values: allUsers, allAuthenticatedUsers, user:{emailid}, serviceAccount:{emailid}, group:{emailid}, domain:{domain}, projectOwner:{projectid}, projectEditor:{projectid}, projectViewer:{projectid}, computed:{identifier}.

    Default is [].

  • computed_members_map: (Optional map(string))

    A map of members to replace in 'var.members' or in members of 'policy_bindings' to handle terraform computed values.

    Default is {}.

  • role: (Optional string)

    The role that should be applied. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}. Omit if policy_bindings is set.

  • project: (Optional string)

    The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

  • authoritative: (Optional bool)

    Whether to exclusively set (authoritative mode) or add (non-authoritative/additive mode) members to the role.

    Default is true.

  • policy_bindings: (Optional list(policy_binding))

    A list of IAM policy bindings. Cannot be used at the same time as role.

    Example:

    policy_bindings = [{
      role    = "roles/run.admin"
      members = ["user:admin@example.com"]
    }]

    Each policy_binding object in the list accepts the following attributes:

    • role: (Required string)

      The role that should be applied.

    • members: (Optional set(string))

      Identities that will be granted the privilege in role.

      Default is var.members.

    • condition: (Optional object(condition))

      An IAM Condition for a given binding.

      Example:

      condition = {
        expression = "request.time < timestamp(\"2024-01-01T00:00:00Z\")"
        title      = "expires_after_2023_12_31"
      }

      The condition object accepts the following attributes:

      • expression: (Required string)

        Textual representation of an expression in Common Expression Language syntax.

      • title: (Required string)

        A title for the expression, i.e. a short string describing its purpose.

      • description: (Optional string)

        An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.

Module Configuration

  • module_enabled: (Optional bool)

    Specifies whether resources in the module will be created.

    Default is true.

  • module_depends_on: (Optional list(dependency))

    A list of dependencies. Any object can be assigned to this list to define a hidden external dependency.

    Example:

    module_depends_on = [
      google_network.network
    ]

Module Outputs

The following attributes are exported in the outputs of the module:

  • iam: (object(iam))

    All attributes of the created google_cloud_run_v2_job_iam_binding or google_cloud_run_v2_job_iam_member or google_cloud_run_v2_job_iam_policy resource according to the mode.

External Documentation

Google Documentation

Terraform Google Provider Documentation:

Module Versioning

This Module follows the principles of Semantic Versioning (SemVer).

Given a version number MAJOR.MINOR.PATCH, we increment the:

  1. MAJOR version when we make incompatible changes,
  2. MINOR version when we add functionality in a backwards compatible manner, and
  3. PATCH version when we make backwards compatible bug fixes.

Backward compatibility in 0.0.z and 0.y.z version

  • Backward compatibility in versions 0.0.z is not guaranteed when z is increased. (Initial development)
  • Backward compatibility in versions 0.y.z is not guaranteed when y is increased. (Pre-release)

About Mineiros

Mineiros is a remote-first company headquartered in Berlin, Germany that solves development, automation and security challenges in cloud infrastructure.

Our vision is to massively reduce time and overhead for teams to manage and deploy production-grade and secure cloud infrastructure.

We offer commercial support for all of our modules and encourage you to reach out if you have any questions or need help. Feel free to email us at hello@mineiros.io or join our Community Discord server.

Reporting Issues

We use GitHub Issues to track community reported issues and missing features.

Contributing

Contributions are always encouraged and welcome! For the process of accepting changes, we use Pull Requests. If you'd like more information, please see our Contribution Guidelines.

Makefile Targets

This repository comes with a handy Makefile. Run make help to see details on each available target.

License

license

This module is licensed under the Apache License Version 2.0, January 2004. Please see LICENSE for full details.

Copyright © 2020-2023 Mineiros GmbH