tags

package
v6.67.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocationTagBinding added in v6.49.0

type LocationTagBinding struct {
	pulumi.CustomResourceState

	// Location of the resource.
	//
	// ***
	Location pulumi.StringPtrOutput `pulumi:"location"`
	// The generated id for the TagBinding. This is a string of the form: `tagBindings/{parent}/{tag-value-name}`
	Name pulumi.StringOutput `pulumi:"name"`
	// The full resource name of the resource the TagValue is bound to. E.g. //cloudresourcemanager.googleapis.com/projects/123
	Parent pulumi.StringOutput `pulumi:"parent"`
	// The TagValue of the TagBinding. Must be of the form tagValues/456.
	TagValue pulumi.StringOutput `pulumi:"tagValue"`
}

A TagBinding represents a connection between a TagValue and a Regional cloud resource (currently project, folder, or organization). Once a TagBinding is created, the TagValue is applied to all the descendants of the cloud resource.

To get more information about TagBinding, see:

* [API documentation](https://cloud.google.com/resource-manager/reference/rest/v3/tagBindings) * How-to Guides

## Example Usage

To bind a tag to a Cloud Run instance:

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := organizations.NewProject(ctx, "project", &organizations.ProjectArgs{
			OrgId:     pulumi.String("123456789"),
			ProjectId: pulumi.String("project_id"),
		})
		if err != nil {
			return err
		}
		key, err := tags.NewTagKey(ctx, "key", &tags.TagKeyArgs{
			Description: pulumi.String("For keyname resources."),
			Parent:      pulumi.String("organizations/123456789"),
			ShortName:   pulumi.String("keyname"),
		})
		if err != nil {
			return err
		}
		value, err := tags.NewTagValue(ctx, "value", &tags.TagValueArgs{
			Description: pulumi.String("For valuename resources."),
			Parent: key.Name.ApplyT(func(name string) (string, error) {
				return fmt.Sprintf("tagKeys/%v", name), nil
			}).(pulumi.StringOutput),
			ShortName: pulumi.String("valuename"),
		})
		if err != nil {
			return err
		}
		_, err = tags.NewLocationTagBinding(ctx, "binding", &tags.LocationTagBindingArgs{
			Location: pulumi.String("us-central1"),
			Parent: project.Number.ApplyT(func(number string) (string, error) {
				return fmt.Sprintf("//run.googleapis.com/projects/%v/locations/%v/services/%v", number, google_cloud_run_service.Default.Location, google_cloud_run_service.Default.Name), nil
			}).(pulumi.StringOutput),
			TagValue: value.Name.ApplyT(func(name string) (string, error) {
				return fmt.Sprintf("tagValues/%v", name), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

To bind a (firewall) tag to compute instance:

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := organizations.NewProject(ctx, "project", &organizations.ProjectArgs{
			OrgId:     pulumi.String("123456789"),
			ProjectId: pulumi.String("project_id"),
		})
		if err != nil {
			return err
		}
		key, err := tags.NewTagKey(ctx, "key", &tags.TagKeyArgs{
			Description: pulumi.String("For keyname resources."),
			Parent:      pulumi.String("organizations/123456789"),
			ShortName:   pulumi.String("keyname"),
		})
		if err != nil {
			return err
		}
		value, err := tags.NewTagValue(ctx, "value", &tags.TagValueArgs{
			Description: pulumi.String("For valuename resources."),
			Parent: key.Name.ApplyT(func(name string) (string, error) {
				return fmt.Sprintf("tagKeys/%v", name), nil
			}).(pulumi.StringOutput),
			ShortName: pulumi.String("valuename"),
		})
		if err != nil {
			return err
		}
		_, err = tags.NewLocationTagBinding(ctx, "binding", &tags.LocationTagBindingArgs{
			Location: pulumi.String("us-central1-a"),
			Parent: project.Number.ApplyT(func(number string) (string, error) {
				return fmt.Sprintf("//compute.googleapis.com/projects/%v/zones/us-central1-a/instances/%v", number, google_compute_instance.Instance.Instance_id), nil
			}).(pulumi.StringOutput),
			TagValue: value.Name.ApplyT(func(name string) (string, error) {
				return fmt.Sprintf("tagValues/%v", name), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

TagBinding can be imported using any of these accepted formats:

```sh

$ pulumi import gcp:tags/locationTagBinding:LocationTagBinding default {{location}}/{{name}}

```

func GetLocationTagBinding added in v6.49.0

func GetLocationTagBinding(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *LocationTagBindingState, opts ...pulumi.ResourceOption) (*LocationTagBinding, error)

GetLocationTagBinding gets an existing LocationTagBinding resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewLocationTagBinding added in v6.49.0

func NewLocationTagBinding(ctx *pulumi.Context,
	name string, args *LocationTagBindingArgs, opts ...pulumi.ResourceOption) (*LocationTagBinding, error)

NewLocationTagBinding registers a new resource with the given unique name, arguments, and options.

func (*LocationTagBinding) ElementType added in v6.49.0

func (*LocationTagBinding) ElementType() reflect.Type

func (*LocationTagBinding) ToLocationTagBindingOutput added in v6.49.0

func (i *LocationTagBinding) ToLocationTagBindingOutput() LocationTagBindingOutput

func (*LocationTagBinding) ToLocationTagBindingOutputWithContext added in v6.49.0

func (i *LocationTagBinding) ToLocationTagBindingOutputWithContext(ctx context.Context) LocationTagBindingOutput

func (*LocationTagBinding) ToOutput added in v6.65.1

type LocationTagBindingArgs added in v6.49.0

type LocationTagBindingArgs struct {
	// Location of the resource.
	//
	// ***
	Location pulumi.StringPtrInput
	// The full resource name of the resource the TagValue is bound to. E.g. //cloudresourcemanager.googleapis.com/projects/123
	Parent pulumi.StringInput
	// The TagValue of the TagBinding. Must be of the form tagValues/456.
	TagValue pulumi.StringInput
}

The set of arguments for constructing a LocationTagBinding resource.

func (LocationTagBindingArgs) ElementType added in v6.49.0

func (LocationTagBindingArgs) ElementType() reflect.Type

type LocationTagBindingArray added in v6.49.0

type LocationTagBindingArray []LocationTagBindingInput

func (LocationTagBindingArray) ElementType added in v6.49.0

func (LocationTagBindingArray) ElementType() reflect.Type

func (LocationTagBindingArray) ToLocationTagBindingArrayOutput added in v6.49.0

func (i LocationTagBindingArray) ToLocationTagBindingArrayOutput() LocationTagBindingArrayOutput

func (LocationTagBindingArray) ToLocationTagBindingArrayOutputWithContext added in v6.49.0

func (i LocationTagBindingArray) ToLocationTagBindingArrayOutputWithContext(ctx context.Context) LocationTagBindingArrayOutput

func (LocationTagBindingArray) ToOutput added in v6.65.1

type LocationTagBindingArrayInput added in v6.49.0

type LocationTagBindingArrayInput interface {
	pulumi.Input

	ToLocationTagBindingArrayOutput() LocationTagBindingArrayOutput
	ToLocationTagBindingArrayOutputWithContext(context.Context) LocationTagBindingArrayOutput
}

LocationTagBindingArrayInput is an input type that accepts LocationTagBindingArray and LocationTagBindingArrayOutput values. You can construct a concrete instance of `LocationTagBindingArrayInput` via:

LocationTagBindingArray{ LocationTagBindingArgs{...} }

type LocationTagBindingArrayOutput added in v6.49.0

type LocationTagBindingArrayOutput struct{ *pulumi.OutputState }

func (LocationTagBindingArrayOutput) ElementType added in v6.49.0

func (LocationTagBindingArrayOutput) Index added in v6.49.0

func (LocationTagBindingArrayOutput) ToLocationTagBindingArrayOutput added in v6.49.0

func (o LocationTagBindingArrayOutput) ToLocationTagBindingArrayOutput() LocationTagBindingArrayOutput

func (LocationTagBindingArrayOutput) ToLocationTagBindingArrayOutputWithContext added in v6.49.0

func (o LocationTagBindingArrayOutput) ToLocationTagBindingArrayOutputWithContext(ctx context.Context) LocationTagBindingArrayOutput

func (LocationTagBindingArrayOutput) ToOutput added in v6.65.1

type LocationTagBindingInput added in v6.49.0

type LocationTagBindingInput interface {
	pulumi.Input

	ToLocationTagBindingOutput() LocationTagBindingOutput
	ToLocationTagBindingOutputWithContext(ctx context.Context) LocationTagBindingOutput
}

type LocationTagBindingMap added in v6.49.0

type LocationTagBindingMap map[string]LocationTagBindingInput

func (LocationTagBindingMap) ElementType added in v6.49.0

func (LocationTagBindingMap) ElementType() reflect.Type

func (LocationTagBindingMap) ToLocationTagBindingMapOutput added in v6.49.0

func (i LocationTagBindingMap) ToLocationTagBindingMapOutput() LocationTagBindingMapOutput

func (LocationTagBindingMap) ToLocationTagBindingMapOutputWithContext added in v6.49.0

func (i LocationTagBindingMap) ToLocationTagBindingMapOutputWithContext(ctx context.Context) LocationTagBindingMapOutput

func (LocationTagBindingMap) ToOutput added in v6.65.1

type LocationTagBindingMapInput added in v6.49.0

type LocationTagBindingMapInput interface {
	pulumi.Input

	ToLocationTagBindingMapOutput() LocationTagBindingMapOutput
	ToLocationTagBindingMapOutputWithContext(context.Context) LocationTagBindingMapOutput
}

LocationTagBindingMapInput is an input type that accepts LocationTagBindingMap and LocationTagBindingMapOutput values. You can construct a concrete instance of `LocationTagBindingMapInput` via:

LocationTagBindingMap{ "key": LocationTagBindingArgs{...} }

type LocationTagBindingMapOutput added in v6.49.0

type LocationTagBindingMapOutput struct{ *pulumi.OutputState }

func (LocationTagBindingMapOutput) ElementType added in v6.49.0

func (LocationTagBindingMapOutput) MapIndex added in v6.49.0

func (LocationTagBindingMapOutput) ToLocationTagBindingMapOutput added in v6.49.0

func (o LocationTagBindingMapOutput) ToLocationTagBindingMapOutput() LocationTagBindingMapOutput

func (LocationTagBindingMapOutput) ToLocationTagBindingMapOutputWithContext added in v6.49.0

func (o LocationTagBindingMapOutput) ToLocationTagBindingMapOutputWithContext(ctx context.Context) LocationTagBindingMapOutput

func (LocationTagBindingMapOutput) ToOutput added in v6.65.1

type LocationTagBindingOutput added in v6.49.0

type LocationTagBindingOutput struct{ *pulumi.OutputState }

func (LocationTagBindingOutput) ElementType added in v6.49.0

func (LocationTagBindingOutput) ElementType() reflect.Type

func (LocationTagBindingOutput) Location added in v6.49.0

Location of the resource.

***

func (LocationTagBindingOutput) Name added in v6.49.0

The generated id for the TagBinding. This is a string of the form: `tagBindings/{parent}/{tag-value-name}`

func (LocationTagBindingOutput) Parent added in v6.49.0

The full resource name of the resource the TagValue is bound to. E.g. //cloudresourcemanager.googleapis.com/projects/123

func (LocationTagBindingOutput) TagValue added in v6.49.0

The TagValue of the TagBinding. Must be of the form tagValues/456.

func (LocationTagBindingOutput) ToLocationTagBindingOutput added in v6.49.0

func (o LocationTagBindingOutput) ToLocationTagBindingOutput() LocationTagBindingOutput

func (LocationTagBindingOutput) ToLocationTagBindingOutputWithContext added in v6.49.0

func (o LocationTagBindingOutput) ToLocationTagBindingOutputWithContext(ctx context.Context) LocationTagBindingOutput

func (LocationTagBindingOutput) ToOutput added in v6.65.1

type LocationTagBindingState added in v6.49.0

type LocationTagBindingState struct {
	// Location of the resource.
	//
	// ***
	Location pulumi.StringPtrInput
	// The generated id for the TagBinding. This is a string of the form: `tagBindings/{parent}/{tag-value-name}`
	Name pulumi.StringPtrInput
	// The full resource name of the resource the TagValue is bound to. E.g. //cloudresourcemanager.googleapis.com/projects/123
	Parent pulumi.StringPtrInput
	// The TagValue of the TagBinding. Must be of the form tagValues/456.
	TagValue pulumi.StringPtrInput
}

func (LocationTagBindingState) ElementType added in v6.49.0

func (LocationTagBindingState) ElementType() reflect.Type

type LookupTagKeyArgs added in v6.26.0

type LookupTagKeyArgs struct {
	// The resource name of the parent organization or project. It can be in format `organizations/{org_id}` or `projects/{project_id_or_number}`.
	Parent string `pulumi:"parent"`
	// The tag key's short_name.
	ShortName string `pulumi:"shortName"`
}

A collection of arguments for invoking getTagKey.

type LookupTagKeyIamPolicyArgs added in v6.59.0

type LookupTagKeyIamPolicyArgs struct {
	// Used to find the parent resource to bind the IAM policy to
	TagKey string `pulumi:"tagKey"`
}

A collection of arguments for invoking getTagKeyIamPolicy.

type LookupTagKeyIamPolicyOutputArgs added in v6.59.0

type LookupTagKeyIamPolicyOutputArgs struct {
	// Used to find the parent resource to bind the IAM policy to
	TagKey pulumi.StringInput `pulumi:"tagKey"`
}

A collection of arguments for invoking getTagKeyIamPolicy.

func (LookupTagKeyIamPolicyOutputArgs) ElementType added in v6.59.0

type LookupTagKeyIamPolicyResult added in v6.59.0

type LookupTagKeyIamPolicyResult struct {
	// (Computed) The etag of the IAM policy.
	Etag string `pulumi:"etag"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// (Required only by `tags.TagKeyIamPolicy`) The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData string `pulumi:"policyData"`
	TagKey     string `pulumi:"tagKey"`
}

A collection of values returned by getTagKeyIamPolicy.

func LookupTagKeyIamPolicy added in v6.59.0

func LookupTagKeyIamPolicy(ctx *pulumi.Context, args *LookupTagKeyIamPolicyArgs, opts ...pulumi.InvokeOption) (*LookupTagKeyIamPolicyResult, error)

Retrieves the current IAM policy data for tagkey

## example

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.LookupTagKeyIamPolicy(ctx, &tags.LookupTagKeyIamPolicyArgs{
			TagKey: google_tags_tag_key.Key.Name,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type LookupTagKeyIamPolicyResultOutput added in v6.59.0

type LookupTagKeyIamPolicyResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getTagKeyIamPolicy.

func LookupTagKeyIamPolicyOutput added in v6.59.0

func (LookupTagKeyIamPolicyResultOutput) ElementType added in v6.59.0

func (LookupTagKeyIamPolicyResultOutput) Etag added in v6.59.0

(Computed) The etag of the IAM policy.

func (LookupTagKeyIamPolicyResultOutput) Id added in v6.59.0

The provider-assigned unique ID for this managed resource.

func (LookupTagKeyIamPolicyResultOutput) PolicyData added in v6.59.0

(Required only by `tags.TagKeyIamPolicy`) The policy data generated by a `organizations.getIAMPolicy` data source.

func (LookupTagKeyIamPolicyResultOutput) TagKey added in v6.59.0

func (LookupTagKeyIamPolicyResultOutput) ToLookupTagKeyIamPolicyResultOutput added in v6.59.0

func (o LookupTagKeyIamPolicyResultOutput) ToLookupTagKeyIamPolicyResultOutput() LookupTagKeyIamPolicyResultOutput

func (LookupTagKeyIamPolicyResultOutput) ToLookupTagKeyIamPolicyResultOutputWithContext added in v6.59.0

func (o LookupTagKeyIamPolicyResultOutput) ToLookupTagKeyIamPolicyResultOutputWithContext(ctx context.Context) LookupTagKeyIamPolicyResultOutput

func (LookupTagKeyIamPolicyResultOutput) ToOutput added in v6.65.1

type LookupTagKeyOutputArgs added in v6.26.0

type LookupTagKeyOutputArgs struct {
	// The resource name of the parent organization or project. It can be in format `organizations/{org_id}` or `projects/{project_id_or_number}`.
	Parent pulumi.StringInput `pulumi:"parent"`
	// The tag key's short_name.
	ShortName pulumi.StringInput `pulumi:"shortName"`
}

A collection of arguments for invoking getTagKey.

func (LookupTagKeyOutputArgs) ElementType added in v6.26.0

func (LookupTagKeyOutputArgs) ElementType() reflect.Type

type LookupTagKeyResult added in v6.26.0

type LookupTagKeyResult struct {
	// Creation time.
	// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
	CreateTime  string `pulumi:"createTime"`
	Description string `pulumi:"description"`
	// an identifier for the resource with format `tagKeys/{{name}}`
	Id string `pulumi:"id"`
	// The generated numeric id for the TagKey.
	Name string `pulumi:"name"`
	// Namespaced name of the TagKey which is in the format `{parentNamespace}/{shortName}`.
	NamespacedName string `pulumi:"namespacedName"`
	Parent         string `pulumi:"parent"`
	ShortName      string `pulumi:"shortName"`
	// Update time.
	// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
	UpdateTime string `pulumi:"updateTime"`
}

A collection of values returned by getTagKey.

func LookupTagKey added in v6.26.0

func LookupTagKey(ctx *pulumi.Context, args *LookupTagKeyArgs, opts ...pulumi.InvokeOption) (*LookupTagKeyResult, error)

Get a tag key by org or project `parent` and `shortName`.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.LookupTagKey(ctx, &tags.LookupTagKeyArgs{
			Parent:    "organizations/12345",
			ShortName: "environment",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

``` ```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.LookupTagKey(ctx, &tags.LookupTagKeyArgs{
			Parent:    "projects/abc",
			ShortName: "environment",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type LookupTagKeyResultOutput added in v6.26.0

type LookupTagKeyResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getTagKey.

func LookupTagKeyOutput added in v6.26.0

func LookupTagKeyOutput(ctx *pulumi.Context, args LookupTagKeyOutputArgs, opts ...pulumi.InvokeOption) LookupTagKeyResultOutput

func (LookupTagKeyResultOutput) CreateTime added in v6.26.0

Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

func (LookupTagKeyResultOutput) Description added in v6.26.0

func (LookupTagKeyResultOutput) ElementType added in v6.26.0

func (LookupTagKeyResultOutput) ElementType() reflect.Type

func (LookupTagKeyResultOutput) Id added in v6.26.0

an identifier for the resource with format `tagKeys/{{name}}`

func (LookupTagKeyResultOutput) Name added in v6.26.0

The generated numeric id for the TagKey.

func (LookupTagKeyResultOutput) NamespacedName added in v6.26.0

func (o LookupTagKeyResultOutput) NamespacedName() pulumi.StringOutput

Namespaced name of the TagKey which is in the format `{parentNamespace}/{shortName}`.

func (LookupTagKeyResultOutput) Parent added in v6.26.0

func (LookupTagKeyResultOutput) ShortName added in v6.26.0

func (LookupTagKeyResultOutput) ToLookupTagKeyResultOutput added in v6.26.0

func (o LookupTagKeyResultOutput) ToLookupTagKeyResultOutput() LookupTagKeyResultOutput

func (LookupTagKeyResultOutput) ToLookupTagKeyResultOutputWithContext added in v6.26.0

func (o LookupTagKeyResultOutput) ToLookupTagKeyResultOutputWithContext(ctx context.Context) LookupTagKeyResultOutput

func (LookupTagKeyResultOutput) ToOutput added in v6.65.1

func (LookupTagKeyResultOutput) UpdateTime added in v6.26.0

Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

type LookupTagValueArgs added in v6.26.0

type LookupTagValueArgs struct {
	// The resource name of the parent tagKey in format `tagKey/{name}`.
	Parent string `pulumi:"parent"`
	// The tag value's short_name.
	ShortName string `pulumi:"shortName"`
}

A collection of arguments for invoking getTagValue.

type LookupTagValueIamPolicyArgs added in v6.59.0

type LookupTagValueIamPolicyArgs struct {
	// Used to find the parent resource to bind the IAM policy to
	TagValue string `pulumi:"tagValue"`
}

A collection of arguments for invoking getTagValueIamPolicy.

type LookupTagValueIamPolicyOutputArgs added in v6.59.0

type LookupTagValueIamPolicyOutputArgs struct {
	// Used to find the parent resource to bind the IAM policy to
	TagValue pulumi.StringInput `pulumi:"tagValue"`
}

A collection of arguments for invoking getTagValueIamPolicy.

func (LookupTagValueIamPolicyOutputArgs) ElementType added in v6.59.0

type LookupTagValueIamPolicyResult added in v6.59.0

type LookupTagValueIamPolicyResult struct {
	// (Computed) The etag of the IAM policy.
	Etag string `pulumi:"etag"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// (Required only by `tags.TagValueIamPolicy`) The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData string `pulumi:"policyData"`
	TagValue   string `pulumi:"tagValue"`
}

A collection of values returned by getTagValueIamPolicy.

func LookupTagValueIamPolicy added in v6.59.0

func LookupTagValueIamPolicy(ctx *pulumi.Context, args *LookupTagValueIamPolicyArgs, opts ...pulumi.InvokeOption) (*LookupTagValueIamPolicyResult, error)

Retrieves the current IAM policy data for tagvalue

## example

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.LookupTagValueIamPolicy(ctx, &tags.LookupTagValueIamPolicyArgs{
			TagValue: google_tags_tag_value.Value.Name,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type LookupTagValueIamPolicyResultOutput added in v6.59.0

type LookupTagValueIamPolicyResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getTagValueIamPolicy.

func LookupTagValueIamPolicyOutput added in v6.59.0

func (LookupTagValueIamPolicyResultOutput) ElementType added in v6.59.0

func (LookupTagValueIamPolicyResultOutput) Etag added in v6.59.0

(Computed) The etag of the IAM policy.

func (LookupTagValueIamPolicyResultOutput) Id added in v6.59.0

The provider-assigned unique ID for this managed resource.

func (LookupTagValueIamPolicyResultOutput) PolicyData added in v6.59.0

(Required only by `tags.TagValueIamPolicy`) The policy data generated by a `organizations.getIAMPolicy` data source.

func (LookupTagValueIamPolicyResultOutput) TagValue added in v6.59.0

func (LookupTagValueIamPolicyResultOutput) ToLookupTagValueIamPolicyResultOutput added in v6.59.0

func (o LookupTagValueIamPolicyResultOutput) ToLookupTagValueIamPolicyResultOutput() LookupTagValueIamPolicyResultOutput

func (LookupTagValueIamPolicyResultOutput) ToLookupTagValueIamPolicyResultOutputWithContext added in v6.59.0

func (o LookupTagValueIamPolicyResultOutput) ToLookupTagValueIamPolicyResultOutputWithContext(ctx context.Context) LookupTagValueIamPolicyResultOutput

func (LookupTagValueIamPolicyResultOutput) ToOutput added in v6.65.1

type LookupTagValueOutputArgs added in v6.26.0

type LookupTagValueOutputArgs struct {
	// The resource name of the parent tagKey in format `tagKey/{name}`.
	Parent pulumi.StringInput `pulumi:"parent"`
	// The tag value's short_name.
	ShortName pulumi.StringInput `pulumi:"shortName"`
}

A collection of arguments for invoking getTagValue.

func (LookupTagValueOutputArgs) ElementType added in v6.26.0

func (LookupTagValueOutputArgs) ElementType() reflect.Type

type LookupTagValueResult added in v6.26.0

type LookupTagValueResult struct {
	// Creation time.
	// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
	CreateTime  string `pulumi:"createTime"`
	Description string `pulumi:"description"`
	// an identifier for the resource with format `tagValues/{{name}}`
	Id string `pulumi:"id"`
	// The generated numeric id for the TagValue.
	Name string `pulumi:"name"`
	// Namespaced name of the TagValue.
	NamespacedName string `pulumi:"namespacedName"`
	Parent         string `pulumi:"parent"`
	ShortName      string `pulumi:"shortName"`
	// Update time.
	// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
	UpdateTime string `pulumi:"updateTime"`
}

A collection of values returned by getTagValue.

func LookupTagValue added in v6.26.0

func LookupTagValue(ctx *pulumi.Context, args *LookupTagValueArgs, opts ...pulumi.InvokeOption) (*LookupTagValueResult, error)

Get a tag value by `parent` key and `shortName`.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.LookupTagValue(ctx, &tags.LookupTagValueArgs{
			Parent:    "tagKeys/56789",
			ShortName: "production",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type LookupTagValueResultOutput added in v6.26.0

type LookupTagValueResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getTagValue.

func LookupTagValueOutput added in v6.26.0

func LookupTagValueOutput(ctx *pulumi.Context, args LookupTagValueOutputArgs, opts ...pulumi.InvokeOption) LookupTagValueResultOutput

func (LookupTagValueResultOutput) CreateTime added in v6.26.0

Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

func (LookupTagValueResultOutput) Description added in v6.26.0

func (LookupTagValueResultOutput) ElementType added in v6.26.0

func (LookupTagValueResultOutput) ElementType() reflect.Type

func (LookupTagValueResultOutput) Id added in v6.26.0

an identifier for the resource with format `tagValues/{{name}}`

func (LookupTagValueResultOutput) Name added in v6.26.0

The generated numeric id for the TagValue.

func (LookupTagValueResultOutput) NamespacedName added in v6.26.0

func (o LookupTagValueResultOutput) NamespacedName() pulumi.StringOutput

Namespaced name of the TagValue.

func (LookupTagValueResultOutput) Parent added in v6.26.0

func (LookupTagValueResultOutput) ShortName added in v6.26.0

func (LookupTagValueResultOutput) ToLookupTagValueResultOutput added in v6.26.0

func (o LookupTagValueResultOutput) ToLookupTagValueResultOutput() LookupTagValueResultOutput

func (LookupTagValueResultOutput) ToLookupTagValueResultOutputWithContext added in v6.26.0

func (o LookupTagValueResultOutput) ToLookupTagValueResultOutputWithContext(ctx context.Context) LookupTagValueResultOutput

func (LookupTagValueResultOutput) ToOutput added in v6.65.1

func (LookupTagValueResultOutput) UpdateTime added in v6.26.0

Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

type TagBinding

type TagBinding struct {
	pulumi.CustomResourceState

	// The generated id for the TagBinding. This is a string of the form: `tagBindings/{full-resource-name}/{tag-value-name}`
	Name pulumi.StringOutput `pulumi:"name"`
	// The full resource name of the resource the TagValue is bound to. E.g. //cloudresourcemanager.googleapis.com/projects/123
	Parent pulumi.StringOutput `pulumi:"parent"`
	// The TagValue of the TagBinding. Must be of the form tagValues/456.
	//
	// ***
	TagValue pulumi.StringOutput `pulumi:"tagValue"`
}

A TagBinding represents a connection between a TagValue and a cloud resource (currently project, folder, or organization). Once a TagBinding is created, the TagValue is applied to all the descendants of the cloud resource.

To get more information about TagBinding, see:

* [API documentation](https://cloud.google.com/resource-manager/reference/rest/v3/tagBindings) * How-to Guides

## Example Usage ### Tag Binding Basic

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := organizations.NewProject(ctx, "project", &organizations.ProjectArgs{
			OrgId:     pulumi.String("123456789"),
			ProjectId: pulumi.String("project_id"),
		})
		if err != nil {
			return err
		}
		key, err := tags.NewTagKey(ctx, "key", &tags.TagKeyArgs{
			Description: pulumi.String("For keyname resources."),
			Parent:      pulumi.String("organizations/123456789"),
			ShortName:   pulumi.String("keyname"),
		})
		if err != nil {
			return err
		}
		value, err := tags.NewTagValue(ctx, "value", &tags.TagValueArgs{
			Description: pulumi.String("For valuename resources."),
			Parent: key.Name.ApplyT(func(name string) (string, error) {
				return fmt.Sprintf("tagKeys/%v", name), nil
			}).(pulumi.StringOutput),
			ShortName: pulumi.String("valuename"),
		})
		if err != nil {
			return err
		}
		_, err = tags.NewTagBinding(ctx, "binding", &tags.TagBindingArgs{
			Parent: project.Number.ApplyT(func(number string) (string, error) {
				return fmt.Sprintf("//cloudresourcemanager.googleapis.com/projects/%v", number), nil
			}).(pulumi.StringOutput),
			TagValue: value.Name.ApplyT(func(name string) (string, error) {
				return fmt.Sprintf("tagValues/%v", name), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

TagBinding can be imported using any of these accepted formats

```sh

$ pulumi import gcp:tags/tagBinding:TagBinding default tagBindings/{{name}}

```

```sh

$ pulumi import gcp:tags/tagBinding:TagBinding default {{name}}

```

func GetTagBinding

func GetTagBinding(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TagBindingState, opts ...pulumi.ResourceOption) (*TagBinding, error)

GetTagBinding gets an existing TagBinding resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTagBinding

func NewTagBinding(ctx *pulumi.Context,
	name string, args *TagBindingArgs, opts ...pulumi.ResourceOption) (*TagBinding, error)

NewTagBinding registers a new resource with the given unique name, arguments, and options.

func (*TagBinding) ElementType

func (*TagBinding) ElementType() reflect.Type

func (*TagBinding) ToOutput added in v6.65.1

func (i *TagBinding) ToOutput(ctx context.Context) pulumix.Output[*TagBinding]

func (*TagBinding) ToTagBindingOutput

func (i *TagBinding) ToTagBindingOutput() TagBindingOutput

func (*TagBinding) ToTagBindingOutputWithContext

func (i *TagBinding) ToTagBindingOutputWithContext(ctx context.Context) TagBindingOutput

type TagBindingArgs

type TagBindingArgs struct {
	// The full resource name of the resource the TagValue is bound to. E.g. //cloudresourcemanager.googleapis.com/projects/123
	Parent pulumi.StringInput
	// The TagValue of the TagBinding. Must be of the form tagValues/456.
	//
	// ***
	TagValue pulumi.StringInput
}

The set of arguments for constructing a TagBinding resource.

func (TagBindingArgs) ElementType

func (TagBindingArgs) ElementType() reflect.Type

type TagBindingArray

type TagBindingArray []TagBindingInput

func (TagBindingArray) ElementType

func (TagBindingArray) ElementType() reflect.Type

func (TagBindingArray) ToOutput added in v6.65.1

func (TagBindingArray) ToTagBindingArrayOutput

func (i TagBindingArray) ToTagBindingArrayOutput() TagBindingArrayOutput

func (TagBindingArray) ToTagBindingArrayOutputWithContext

func (i TagBindingArray) ToTagBindingArrayOutputWithContext(ctx context.Context) TagBindingArrayOutput

type TagBindingArrayInput

type TagBindingArrayInput interface {
	pulumi.Input

	ToTagBindingArrayOutput() TagBindingArrayOutput
	ToTagBindingArrayOutputWithContext(context.Context) TagBindingArrayOutput
}

TagBindingArrayInput is an input type that accepts TagBindingArray and TagBindingArrayOutput values. You can construct a concrete instance of `TagBindingArrayInput` via:

TagBindingArray{ TagBindingArgs{...} }

type TagBindingArrayOutput

type TagBindingArrayOutput struct{ *pulumi.OutputState }

func (TagBindingArrayOutput) ElementType

func (TagBindingArrayOutput) ElementType() reflect.Type

func (TagBindingArrayOutput) Index

func (TagBindingArrayOutput) ToOutput added in v6.65.1

func (TagBindingArrayOutput) ToTagBindingArrayOutput

func (o TagBindingArrayOutput) ToTagBindingArrayOutput() TagBindingArrayOutput

func (TagBindingArrayOutput) ToTagBindingArrayOutputWithContext

func (o TagBindingArrayOutput) ToTagBindingArrayOutputWithContext(ctx context.Context) TagBindingArrayOutput

type TagBindingInput

type TagBindingInput interface {
	pulumi.Input

	ToTagBindingOutput() TagBindingOutput
	ToTagBindingOutputWithContext(ctx context.Context) TagBindingOutput
}

type TagBindingMap

type TagBindingMap map[string]TagBindingInput

func (TagBindingMap) ElementType

func (TagBindingMap) ElementType() reflect.Type

func (TagBindingMap) ToOutput added in v6.65.1

func (TagBindingMap) ToTagBindingMapOutput

func (i TagBindingMap) ToTagBindingMapOutput() TagBindingMapOutput

func (TagBindingMap) ToTagBindingMapOutputWithContext

func (i TagBindingMap) ToTagBindingMapOutputWithContext(ctx context.Context) TagBindingMapOutput

type TagBindingMapInput

type TagBindingMapInput interface {
	pulumi.Input

	ToTagBindingMapOutput() TagBindingMapOutput
	ToTagBindingMapOutputWithContext(context.Context) TagBindingMapOutput
}

TagBindingMapInput is an input type that accepts TagBindingMap and TagBindingMapOutput values. You can construct a concrete instance of `TagBindingMapInput` via:

TagBindingMap{ "key": TagBindingArgs{...} }

type TagBindingMapOutput

type TagBindingMapOutput struct{ *pulumi.OutputState }

func (TagBindingMapOutput) ElementType

func (TagBindingMapOutput) ElementType() reflect.Type

func (TagBindingMapOutput) MapIndex

func (TagBindingMapOutput) ToOutput added in v6.65.1

func (TagBindingMapOutput) ToTagBindingMapOutput

func (o TagBindingMapOutput) ToTagBindingMapOutput() TagBindingMapOutput

func (TagBindingMapOutput) ToTagBindingMapOutputWithContext

func (o TagBindingMapOutput) ToTagBindingMapOutputWithContext(ctx context.Context) TagBindingMapOutput

type TagBindingOutput

type TagBindingOutput struct{ *pulumi.OutputState }

func (TagBindingOutput) ElementType

func (TagBindingOutput) ElementType() reflect.Type

func (TagBindingOutput) Name added in v6.23.0

The generated id for the TagBinding. This is a string of the form: `tagBindings/{full-resource-name}/{tag-value-name}`

func (TagBindingOutput) Parent added in v6.23.0

The full resource name of the resource the TagValue is bound to. E.g. //cloudresourcemanager.googleapis.com/projects/123

func (TagBindingOutput) TagValue added in v6.23.0

func (o TagBindingOutput) TagValue() pulumi.StringOutput

The TagValue of the TagBinding. Must be of the form tagValues/456.

***

func (TagBindingOutput) ToOutput added in v6.65.1

func (TagBindingOutput) ToTagBindingOutput

func (o TagBindingOutput) ToTagBindingOutput() TagBindingOutput

func (TagBindingOutput) ToTagBindingOutputWithContext

func (o TagBindingOutput) ToTagBindingOutputWithContext(ctx context.Context) TagBindingOutput

type TagBindingState

type TagBindingState struct {
	// The generated id for the TagBinding. This is a string of the form: `tagBindings/{full-resource-name}/{tag-value-name}`
	Name pulumi.StringPtrInput
	// The full resource name of the resource the TagValue is bound to. E.g. //cloudresourcemanager.googleapis.com/projects/123
	Parent pulumi.StringPtrInput
	// The TagValue of the TagBinding. Must be of the form tagValues/456.
	//
	// ***
	TagValue pulumi.StringPtrInput
}

func (TagBindingState) ElementType

func (TagBindingState) ElementType() reflect.Type

type TagKey

type TagKey struct {
	pulumi.CustomResourceState

	// Output only. Creation time.
	// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
	CreateTime pulumi.StringOutput `pulumi:"createTime"`
	// User-assigned description of the TagKey. Must not exceed 256 characters.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The generated numeric id for the TagKey.
	Name pulumi.StringOutput `pulumi:"name"`
	// Output only. Namespaced name of the TagKey.
	NamespacedName pulumi.StringOutput `pulumi:"namespacedName"`
	// Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
	Parent pulumi.StringOutput `pulumi:"parent"`
	// Optional. A purpose cannot be changed once set.
	// A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag.
	// Possible values are: `GCE_FIREWALL`.
	Purpose pulumi.StringPtrOutput `pulumi:"purpose"`
	// Optional. Purpose data cannot be changed once set.
	// Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: `network = "<project-name>/<vpc-name>"`.
	PurposeData pulumi.StringMapOutput `pulumi:"purposeData"`
	// Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace.
	// The short name must be 1-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
	//
	// ***
	ShortName pulumi.StringOutput `pulumi:"shortName"`
	// Output only. Update time.
	// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
	UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
}

A TagKey, used to group a set of TagValues.

To get more information about TagKey, see:

* [API documentation](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys) * How-to Guides

## Example Usage ### Tag Key Basic

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagKey(ctx, "key", &tags.TagKeyArgs{
			Description: pulumi.String("For keyname resources."),
			Parent:      pulumi.String("organizations/123456789"),
			ShortName:   pulumi.String("keyname"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

TagKey can be imported using any of these accepted formats

```sh

$ pulumi import gcp:tags/tagKey:TagKey default tagKeys/{{name}}

```

```sh

$ pulumi import gcp:tags/tagKey:TagKey default {{name}}

```

func GetTagKey

func GetTagKey(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TagKeyState, opts ...pulumi.ResourceOption) (*TagKey, error)

GetTagKey gets an existing TagKey resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTagKey

func NewTagKey(ctx *pulumi.Context,
	name string, args *TagKeyArgs, opts ...pulumi.ResourceOption) (*TagKey, error)

NewTagKey registers a new resource with the given unique name, arguments, and options.

func (*TagKey) ElementType

func (*TagKey) ElementType() reflect.Type

func (*TagKey) ToOutput added in v6.65.1

func (i *TagKey) ToOutput(ctx context.Context) pulumix.Output[*TagKey]

func (*TagKey) ToTagKeyOutput

func (i *TagKey) ToTagKeyOutput() TagKeyOutput

func (*TagKey) ToTagKeyOutputWithContext

func (i *TagKey) ToTagKeyOutputWithContext(ctx context.Context) TagKeyOutput

type TagKeyArgs

type TagKeyArgs struct {
	// User-assigned description of the TagKey. Must not exceed 256 characters.
	Description pulumi.StringPtrInput
	// Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
	Parent pulumi.StringInput
	// Optional. A purpose cannot be changed once set.
	// A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag.
	// Possible values are: `GCE_FIREWALL`.
	Purpose pulumi.StringPtrInput
	// Optional. Purpose data cannot be changed once set.
	// Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: `network = "<project-name>/<vpc-name>"`.
	PurposeData pulumi.StringMapInput
	// Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace.
	// The short name must be 1-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
	//
	// ***
	ShortName pulumi.StringInput
}

The set of arguments for constructing a TagKey resource.

func (TagKeyArgs) ElementType

func (TagKeyArgs) ElementType() reflect.Type

type TagKeyArray

type TagKeyArray []TagKeyInput

func (TagKeyArray) ElementType

func (TagKeyArray) ElementType() reflect.Type

func (TagKeyArray) ToOutput added in v6.65.1

func (i TagKeyArray) ToOutput(ctx context.Context) pulumix.Output[[]*TagKey]

func (TagKeyArray) ToTagKeyArrayOutput

func (i TagKeyArray) ToTagKeyArrayOutput() TagKeyArrayOutput

func (TagKeyArray) ToTagKeyArrayOutputWithContext

func (i TagKeyArray) ToTagKeyArrayOutputWithContext(ctx context.Context) TagKeyArrayOutput

type TagKeyArrayInput

type TagKeyArrayInput interface {
	pulumi.Input

	ToTagKeyArrayOutput() TagKeyArrayOutput
	ToTagKeyArrayOutputWithContext(context.Context) TagKeyArrayOutput
}

TagKeyArrayInput is an input type that accepts TagKeyArray and TagKeyArrayOutput values. You can construct a concrete instance of `TagKeyArrayInput` via:

TagKeyArray{ TagKeyArgs{...} }

type TagKeyArrayOutput

type TagKeyArrayOutput struct{ *pulumi.OutputState }

func (TagKeyArrayOutput) ElementType

func (TagKeyArrayOutput) ElementType() reflect.Type

func (TagKeyArrayOutput) Index

func (TagKeyArrayOutput) ToOutput added in v6.65.1

func (o TagKeyArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*TagKey]

func (TagKeyArrayOutput) ToTagKeyArrayOutput

func (o TagKeyArrayOutput) ToTagKeyArrayOutput() TagKeyArrayOutput

func (TagKeyArrayOutput) ToTagKeyArrayOutputWithContext

func (o TagKeyArrayOutput) ToTagKeyArrayOutputWithContext(ctx context.Context) TagKeyArrayOutput

type TagKeyIamBinding

type TagKeyIamBinding struct {
	pulumi.CustomResourceState

	Condition TagKeyIamBindingConditionPtrOutput `pulumi:"condition"`
	// (Computed) The etag of the IAM policy.
	Etag    pulumi.StringOutput      `pulumi:"etag"`
	Members pulumi.StringArrayOutput `pulumi:"members"`
	// The role that should be applied. Only one
	// `tags.TagKeyIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringOutput `pulumi:"role"`
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagKey pulumi.StringOutput `pulumi:"tagKey"`
}

Three different resources help you manage your IAM policy for Tags TagKey. Each of these resources serves a different use case:

* `tags.TagKeyIamPolicy`: Authoritative. Sets the IAM policy for the tagkey and replaces any existing policy already attached. * `tags.TagKeyIamBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the tagkey are preserved. * `tags.TagKeyIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the tagkey are preserved.

A data source can be used to retrieve policy data in advent you do not need creation

* `tags.TagKeyIamPolicy`: Retrieves the IAM policy for the tagkey

> **Note:** `tags.TagKeyIamPolicy` **cannot** be used in conjunction with `tags.TagKeyIamBinding` and `tags.TagKeyIamMember` or they will fight over what your policy should be.

> **Note:** `tags.TagKeyIamBinding` resources **can be** used in conjunction with `tags.TagKeyIamMember` resources **only if** they do not grant privilege to the same role.

## google\_tags\_tag\_key\_iam\_policy

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []organizations.GetIAMPolicyBinding{
				{
					Role: "roles/viewer",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = tags.NewTagKeyIamPolicy(ctx, "policy", &tags.TagKeyIamPolicyArgs{
			TagKey:     pulumi.Any(google_tags_tag_key.Key.Name),
			PolicyData: *pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_tags\_tag\_key\_iam\_binding

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagKeyIamBinding(ctx, "binding", &tags.TagKeyIamBindingArgs{
			TagKey: pulumi.Any(google_tags_tag_key.Key.Name),
			Role:   pulumi.String("roles/viewer"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_tags\_tag\_key\_iam\_member

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagKeyIamMember(ctx, "member", &tags.TagKeyIamMemberArgs{
			TagKey: pulumi.Any(google_tags_tag_key.Key.Name),
			Role:   pulumi.String("roles/viewer"),
			Member: pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

For all import syntaxes, the "resource in question" can take any of the following forms* tagKeys/{{name}} * {{name}} Any variables not passed in the import command will be taken from the provider configuration. Tags tagkey IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.

```sh

$ pulumi import gcp:tags/tagKeyIamBinding:TagKeyIamBinding editor "tagKeys/{{tag_key}} roles/viewer user:jane@example.com"

```

IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.

```sh

$ pulumi import gcp:tags/tagKeyIamBinding:TagKeyIamBinding editor "tagKeys/{{tag_key}} roles/viewer"

```

IAM policy imports use the identifier of the resource in question, e.g.

```sh

$ pulumi import gcp:tags/tagKeyIamBinding:TagKeyIamBinding editor tagKeys/{{tag_key}}

```

-> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the

full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.

func GetTagKeyIamBinding

func GetTagKeyIamBinding(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TagKeyIamBindingState, opts ...pulumi.ResourceOption) (*TagKeyIamBinding, error)

GetTagKeyIamBinding gets an existing TagKeyIamBinding resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTagKeyIamBinding

func NewTagKeyIamBinding(ctx *pulumi.Context,
	name string, args *TagKeyIamBindingArgs, opts ...pulumi.ResourceOption) (*TagKeyIamBinding, error)

NewTagKeyIamBinding registers a new resource with the given unique name, arguments, and options.

func (*TagKeyIamBinding) ElementType

func (*TagKeyIamBinding) ElementType() reflect.Type

func (*TagKeyIamBinding) ToOutput added in v6.65.1

func (*TagKeyIamBinding) ToTagKeyIamBindingOutput

func (i *TagKeyIamBinding) ToTagKeyIamBindingOutput() TagKeyIamBindingOutput

func (*TagKeyIamBinding) ToTagKeyIamBindingOutputWithContext

func (i *TagKeyIamBinding) ToTagKeyIamBindingOutputWithContext(ctx context.Context) TagKeyIamBindingOutput

type TagKeyIamBindingArgs

type TagKeyIamBindingArgs struct {
	Condition TagKeyIamBindingConditionPtrInput
	Members   pulumi.StringArrayInput
	// The role that should be applied. Only one
	// `tags.TagKeyIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagKey pulumi.StringInput
}

The set of arguments for constructing a TagKeyIamBinding resource.

func (TagKeyIamBindingArgs) ElementType

func (TagKeyIamBindingArgs) ElementType() reflect.Type

type TagKeyIamBindingArray

type TagKeyIamBindingArray []TagKeyIamBindingInput

func (TagKeyIamBindingArray) ElementType

func (TagKeyIamBindingArray) ElementType() reflect.Type

func (TagKeyIamBindingArray) ToOutput added in v6.65.1

func (TagKeyIamBindingArray) ToTagKeyIamBindingArrayOutput

func (i TagKeyIamBindingArray) ToTagKeyIamBindingArrayOutput() TagKeyIamBindingArrayOutput

func (TagKeyIamBindingArray) ToTagKeyIamBindingArrayOutputWithContext

func (i TagKeyIamBindingArray) ToTagKeyIamBindingArrayOutputWithContext(ctx context.Context) TagKeyIamBindingArrayOutput

type TagKeyIamBindingArrayInput

type TagKeyIamBindingArrayInput interface {
	pulumi.Input

	ToTagKeyIamBindingArrayOutput() TagKeyIamBindingArrayOutput
	ToTagKeyIamBindingArrayOutputWithContext(context.Context) TagKeyIamBindingArrayOutput
}

TagKeyIamBindingArrayInput is an input type that accepts TagKeyIamBindingArray and TagKeyIamBindingArrayOutput values. You can construct a concrete instance of `TagKeyIamBindingArrayInput` via:

TagKeyIamBindingArray{ TagKeyIamBindingArgs{...} }

type TagKeyIamBindingArrayOutput

type TagKeyIamBindingArrayOutput struct{ *pulumi.OutputState }

func (TagKeyIamBindingArrayOutput) ElementType

func (TagKeyIamBindingArrayOutput) Index

func (TagKeyIamBindingArrayOutput) ToOutput added in v6.65.1

func (TagKeyIamBindingArrayOutput) ToTagKeyIamBindingArrayOutput

func (o TagKeyIamBindingArrayOutput) ToTagKeyIamBindingArrayOutput() TagKeyIamBindingArrayOutput

func (TagKeyIamBindingArrayOutput) ToTagKeyIamBindingArrayOutputWithContext

func (o TagKeyIamBindingArrayOutput) ToTagKeyIamBindingArrayOutputWithContext(ctx context.Context) TagKeyIamBindingArrayOutput

type TagKeyIamBindingCondition

type TagKeyIamBindingCondition struct {
	Description *string `pulumi:"description"`
	Expression  string  `pulumi:"expression"`
	Title       string  `pulumi:"title"`
}

type TagKeyIamBindingConditionArgs

type TagKeyIamBindingConditionArgs struct {
	Description pulumi.StringPtrInput `pulumi:"description"`
	Expression  pulumi.StringInput    `pulumi:"expression"`
	Title       pulumi.StringInput    `pulumi:"title"`
}

func (TagKeyIamBindingConditionArgs) ElementType

func (TagKeyIamBindingConditionArgs) ToOutput added in v6.65.1

func (TagKeyIamBindingConditionArgs) ToTagKeyIamBindingConditionOutput

func (i TagKeyIamBindingConditionArgs) ToTagKeyIamBindingConditionOutput() TagKeyIamBindingConditionOutput

func (TagKeyIamBindingConditionArgs) ToTagKeyIamBindingConditionOutputWithContext

func (i TagKeyIamBindingConditionArgs) ToTagKeyIamBindingConditionOutputWithContext(ctx context.Context) TagKeyIamBindingConditionOutput

func (TagKeyIamBindingConditionArgs) ToTagKeyIamBindingConditionPtrOutput

func (i TagKeyIamBindingConditionArgs) ToTagKeyIamBindingConditionPtrOutput() TagKeyIamBindingConditionPtrOutput

func (TagKeyIamBindingConditionArgs) ToTagKeyIamBindingConditionPtrOutputWithContext

func (i TagKeyIamBindingConditionArgs) ToTagKeyIamBindingConditionPtrOutputWithContext(ctx context.Context) TagKeyIamBindingConditionPtrOutput

type TagKeyIamBindingConditionInput

type TagKeyIamBindingConditionInput interface {
	pulumi.Input

	ToTagKeyIamBindingConditionOutput() TagKeyIamBindingConditionOutput
	ToTagKeyIamBindingConditionOutputWithContext(context.Context) TagKeyIamBindingConditionOutput
}

TagKeyIamBindingConditionInput is an input type that accepts TagKeyIamBindingConditionArgs and TagKeyIamBindingConditionOutput values. You can construct a concrete instance of `TagKeyIamBindingConditionInput` via:

TagKeyIamBindingConditionArgs{...}

type TagKeyIamBindingConditionOutput

type TagKeyIamBindingConditionOutput struct{ *pulumi.OutputState }

func (TagKeyIamBindingConditionOutput) Description

func (TagKeyIamBindingConditionOutput) ElementType

func (TagKeyIamBindingConditionOutput) Expression

func (TagKeyIamBindingConditionOutput) Title

func (TagKeyIamBindingConditionOutput) ToOutput added in v6.65.1

func (TagKeyIamBindingConditionOutput) ToTagKeyIamBindingConditionOutput

func (o TagKeyIamBindingConditionOutput) ToTagKeyIamBindingConditionOutput() TagKeyIamBindingConditionOutput

func (TagKeyIamBindingConditionOutput) ToTagKeyIamBindingConditionOutputWithContext

func (o TagKeyIamBindingConditionOutput) ToTagKeyIamBindingConditionOutputWithContext(ctx context.Context) TagKeyIamBindingConditionOutput

func (TagKeyIamBindingConditionOutput) ToTagKeyIamBindingConditionPtrOutput

func (o TagKeyIamBindingConditionOutput) ToTagKeyIamBindingConditionPtrOutput() TagKeyIamBindingConditionPtrOutput

func (TagKeyIamBindingConditionOutput) ToTagKeyIamBindingConditionPtrOutputWithContext

func (o TagKeyIamBindingConditionOutput) ToTagKeyIamBindingConditionPtrOutputWithContext(ctx context.Context) TagKeyIamBindingConditionPtrOutput

type TagKeyIamBindingConditionPtrInput

type TagKeyIamBindingConditionPtrInput interface {
	pulumi.Input

	ToTagKeyIamBindingConditionPtrOutput() TagKeyIamBindingConditionPtrOutput
	ToTagKeyIamBindingConditionPtrOutputWithContext(context.Context) TagKeyIamBindingConditionPtrOutput
}

TagKeyIamBindingConditionPtrInput is an input type that accepts TagKeyIamBindingConditionArgs, TagKeyIamBindingConditionPtr and TagKeyIamBindingConditionPtrOutput values. You can construct a concrete instance of `TagKeyIamBindingConditionPtrInput` via:

        TagKeyIamBindingConditionArgs{...}

or:

        nil

type TagKeyIamBindingConditionPtrOutput

type TagKeyIamBindingConditionPtrOutput struct{ *pulumi.OutputState }

func (TagKeyIamBindingConditionPtrOutput) Description

func (TagKeyIamBindingConditionPtrOutput) Elem

func (TagKeyIamBindingConditionPtrOutput) ElementType

func (TagKeyIamBindingConditionPtrOutput) Expression

func (TagKeyIamBindingConditionPtrOutput) Title

func (TagKeyIamBindingConditionPtrOutput) ToOutput added in v6.65.1

func (TagKeyIamBindingConditionPtrOutput) ToTagKeyIamBindingConditionPtrOutput

func (o TagKeyIamBindingConditionPtrOutput) ToTagKeyIamBindingConditionPtrOutput() TagKeyIamBindingConditionPtrOutput

func (TagKeyIamBindingConditionPtrOutput) ToTagKeyIamBindingConditionPtrOutputWithContext

func (o TagKeyIamBindingConditionPtrOutput) ToTagKeyIamBindingConditionPtrOutputWithContext(ctx context.Context) TagKeyIamBindingConditionPtrOutput

type TagKeyIamBindingInput

type TagKeyIamBindingInput interface {
	pulumi.Input

	ToTagKeyIamBindingOutput() TagKeyIamBindingOutput
	ToTagKeyIamBindingOutputWithContext(ctx context.Context) TagKeyIamBindingOutput
}

type TagKeyIamBindingMap

type TagKeyIamBindingMap map[string]TagKeyIamBindingInput

func (TagKeyIamBindingMap) ElementType

func (TagKeyIamBindingMap) ElementType() reflect.Type

func (TagKeyIamBindingMap) ToOutput added in v6.65.1

func (TagKeyIamBindingMap) ToTagKeyIamBindingMapOutput

func (i TagKeyIamBindingMap) ToTagKeyIamBindingMapOutput() TagKeyIamBindingMapOutput

func (TagKeyIamBindingMap) ToTagKeyIamBindingMapOutputWithContext

func (i TagKeyIamBindingMap) ToTagKeyIamBindingMapOutputWithContext(ctx context.Context) TagKeyIamBindingMapOutput

type TagKeyIamBindingMapInput

type TagKeyIamBindingMapInput interface {
	pulumi.Input

	ToTagKeyIamBindingMapOutput() TagKeyIamBindingMapOutput
	ToTagKeyIamBindingMapOutputWithContext(context.Context) TagKeyIamBindingMapOutput
}

TagKeyIamBindingMapInput is an input type that accepts TagKeyIamBindingMap and TagKeyIamBindingMapOutput values. You can construct a concrete instance of `TagKeyIamBindingMapInput` via:

TagKeyIamBindingMap{ "key": TagKeyIamBindingArgs{...} }

type TagKeyIamBindingMapOutput

type TagKeyIamBindingMapOutput struct{ *pulumi.OutputState }

func (TagKeyIamBindingMapOutput) ElementType

func (TagKeyIamBindingMapOutput) ElementType() reflect.Type

func (TagKeyIamBindingMapOutput) MapIndex

func (TagKeyIamBindingMapOutput) ToOutput added in v6.65.1

func (TagKeyIamBindingMapOutput) ToTagKeyIamBindingMapOutput

func (o TagKeyIamBindingMapOutput) ToTagKeyIamBindingMapOutput() TagKeyIamBindingMapOutput

func (TagKeyIamBindingMapOutput) ToTagKeyIamBindingMapOutputWithContext

func (o TagKeyIamBindingMapOutput) ToTagKeyIamBindingMapOutputWithContext(ctx context.Context) TagKeyIamBindingMapOutput

type TagKeyIamBindingOutput

type TagKeyIamBindingOutput struct{ *pulumi.OutputState }

func (TagKeyIamBindingOutput) Condition added in v6.23.0

func (TagKeyIamBindingOutput) ElementType

func (TagKeyIamBindingOutput) ElementType() reflect.Type

func (TagKeyIamBindingOutput) Etag added in v6.23.0

(Computed) The etag of the IAM policy.

func (TagKeyIamBindingOutput) Members added in v6.23.0

func (TagKeyIamBindingOutput) Role added in v6.23.0

The role that should be applied. Only one `tags.TagKeyIamBinding` can be used per role. Note that custom roles must be of the format `[projects|organizations]/{parent-name}/roles/{role-name}`.

func (TagKeyIamBindingOutput) TagKey added in v6.23.0

Used to find the parent resource to bind the IAM policy to

  • `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values:
  • **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
  • **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
  • **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
  • **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
  • **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
  • **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
  • **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"

func (TagKeyIamBindingOutput) ToOutput added in v6.65.1

func (TagKeyIamBindingOutput) ToTagKeyIamBindingOutput

func (o TagKeyIamBindingOutput) ToTagKeyIamBindingOutput() TagKeyIamBindingOutput

func (TagKeyIamBindingOutput) ToTagKeyIamBindingOutputWithContext

func (o TagKeyIamBindingOutput) ToTagKeyIamBindingOutputWithContext(ctx context.Context) TagKeyIamBindingOutput

type TagKeyIamBindingState

type TagKeyIamBindingState struct {
	Condition TagKeyIamBindingConditionPtrInput
	// (Computed) The etag of the IAM policy.
	Etag    pulumi.StringPtrInput
	Members pulumi.StringArrayInput
	// The role that should be applied. Only one
	// `tags.TagKeyIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringPtrInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagKey pulumi.StringPtrInput
}

func (TagKeyIamBindingState) ElementType

func (TagKeyIamBindingState) ElementType() reflect.Type

type TagKeyIamMember

type TagKeyIamMember struct {
	pulumi.CustomResourceState

	Condition TagKeyIamMemberConditionPtrOutput `pulumi:"condition"`
	// (Computed) The etag of the IAM policy.
	Etag   pulumi.StringOutput `pulumi:"etag"`
	Member pulumi.StringOutput `pulumi:"member"`
	// The role that should be applied. Only one
	// `tags.TagKeyIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringOutput `pulumi:"role"`
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagKey pulumi.StringOutput `pulumi:"tagKey"`
}

Three different resources help you manage your IAM policy for Tags TagKey. Each of these resources serves a different use case:

* `tags.TagKeyIamPolicy`: Authoritative. Sets the IAM policy for the tagkey and replaces any existing policy already attached. * `tags.TagKeyIamBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the tagkey are preserved. * `tags.TagKeyIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the tagkey are preserved.

A data source can be used to retrieve policy data in advent you do not need creation

* `tags.TagKeyIamPolicy`: Retrieves the IAM policy for the tagkey

> **Note:** `tags.TagKeyIamPolicy` **cannot** be used in conjunction with `tags.TagKeyIamBinding` and `tags.TagKeyIamMember` or they will fight over what your policy should be.

> **Note:** `tags.TagKeyIamBinding` resources **can be** used in conjunction with `tags.TagKeyIamMember` resources **only if** they do not grant privilege to the same role.

## google\_tags\_tag\_key\_iam\_policy

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []organizations.GetIAMPolicyBinding{
				{
					Role: "roles/viewer",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = tags.NewTagKeyIamPolicy(ctx, "policy", &tags.TagKeyIamPolicyArgs{
			TagKey:     pulumi.Any(google_tags_tag_key.Key.Name),
			PolicyData: *pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_tags\_tag\_key\_iam\_binding

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagKeyIamBinding(ctx, "binding", &tags.TagKeyIamBindingArgs{
			TagKey: pulumi.Any(google_tags_tag_key.Key.Name),
			Role:   pulumi.String("roles/viewer"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_tags\_tag\_key\_iam\_member

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagKeyIamMember(ctx, "member", &tags.TagKeyIamMemberArgs{
			TagKey: pulumi.Any(google_tags_tag_key.Key.Name),
			Role:   pulumi.String("roles/viewer"),
			Member: pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

For all import syntaxes, the "resource in question" can take any of the following forms* tagKeys/{{name}} * {{name}} Any variables not passed in the import command will be taken from the provider configuration. Tags tagkey IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.

```sh

$ pulumi import gcp:tags/tagKeyIamMember:TagKeyIamMember editor "tagKeys/{{tag_key}} roles/viewer user:jane@example.com"

```

IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.

```sh

$ pulumi import gcp:tags/tagKeyIamMember:TagKeyIamMember editor "tagKeys/{{tag_key}} roles/viewer"

```

IAM policy imports use the identifier of the resource in question, e.g.

```sh

$ pulumi import gcp:tags/tagKeyIamMember:TagKeyIamMember editor tagKeys/{{tag_key}}

```

-> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the

full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.

func GetTagKeyIamMember

func GetTagKeyIamMember(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TagKeyIamMemberState, opts ...pulumi.ResourceOption) (*TagKeyIamMember, error)

GetTagKeyIamMember gets an existing TagKeyIamMember resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTagKeyIamMember

func NewTagKeyIamMember(ctx *pulumi.Context,
	name string, args *TagKeyIamMemberArgs, opts ...pulumi.ResourceOption) (*TagKeyIamMember, error)

NewTagKeyIamMember registers a new resource with the given unique name, arguments, and options.

func (*TagKeyIamMember) ElementType

func (*TagKeyIamMember) ElementType() reflect.Type

func (*TagKeyIamMember) ToOutput added in v6.65.1

func (*TagKeyIamMember) ToTagKeyIamMemberOutput

func (i *TagKeyIamMember) ToTagKeyIamMemberOutput() TagKeyIamMemberOutput

func (*TagKeyIamMember) ToTagKeyIamMemberOutputWithContext

func (i *TagKeyIamMember) ToTagKeyIamMemberOutputWithContext(ctx context.Context) TagKeyIamMemberOutput

type TagKeyIamMemberArgs

type TagKeyIamMemberArgs struct {
	Condition TagKeyIamMemberConditionPtrInput
	Member    pulumi.StringInput
	// The role that should be applied. Only one
	// `tags.TagKeyIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagKey pulumi.StringInput
}

The set of arguments for constructing a TagKeyIamMember resource.

func (TagKeyIamMemberArgs) ElementType

func (TagKeyIamMemberArgs) ElementType() reflect.Type

type TagKeyIamMemberArray

type TagKeyIamMemberArray []TagKeyIamMemberInput

func (TagKeyIamMemberArray) ElementType

func (TagKeyIamMemberArray) ElementType() reflect.Type

func (TagKeyIamMemberArray) ToOutput added in v6.65.1

func (TagKeyIamMemberArray) ToTagKeyIamMemberArrayOutput

func (i TagKeyIamMemberArray) ToTagKeyIamMemberArrayOutput() TagKeyIamMemberArrayOutput

func (TagKeyIamMemberArray) ToTagKeyIamMemberArrayOutputWithContext

func (i TagKeyIamMemberArray) ToTagKeyIamMemberArrayOutputWithContext(ctx context.Context) TagKeyIamMemberArrayOutput

type TagKeyIamMemberArrayInput

type TagKeyIamMemberArrayInput interface {
	pulumi.Input

	ToTagKeyIamMemberArrayOutput() TagKeyIamMemberArrayOutput
	ToTagKeyIamMemberArrayOutputWithContext(context.Context) TagKeyIamMemberArrayOutput
}

TagKeyIamMemberArrayInput is an input type that accepts TagKeyIamMemberArray and TagKeyIamMemberArrayOutput values. You can construct a concrete instance of `TagKeyIamMemberArrayInput` via:

TagKeyIamMemberArray{ TagKeyIamMemberArgs{...} }

type TagKeyIamMemberArrayOutput

type TagKeyIamMemberArrayOutput struct{ *pulumi.OutputState }

func (TagKeyIamMemberArrayOutput) ElementType

func (TagKeyIamMemberArrayOutput) ElementType() reflect.Type

func (TagKeyIamMemberArrayOutput) Index

func (TagKeyIamMemberArrayOutput) ToOutput added in v6.65.1

func (TagKeyIamMemberArrayOutput) ToTagKeyIamMemberArrayOutput

func (o TagKeyIamMemberArrayOutput) ToTagKeyIamMemberArrayOutput() TagKeyIamMemberArrayOutput

func (TagKeyIamMemberArrayOutput) ToTagKeyIamMemberArrayOutputWithContext

func (o TagKeyIamMemberArrayOutput) ToTagKeyIamMemberArrayOutputWithContext(ctx context.Context) TagKeyIamMemberArrayOutput

type TagKeyIamMemberCondition

type TagKeyIamMemberCondition struct {
	Description *string `pulumi:"description"`
	Expression  string  `pulumi:"expression"`
	Title       string  `pulumi:"title"`
}

type TagKeyIamMemberConditionArgs

type TagKeyIamMemberConditionArgs struct {
	Description pulumi.StringPtrInput `pulumi:"description"`
	Expression  pulumi.StringInput    `pulumi:"expression"`
	Title       pulumi.StringInput    `pulumi:"title"`
}

func (TagKeyIamMemberConditionArgs) ElementType

func (TagKeyIamMemberConditionArgs) ToOutput added in v6.65.1

func (TagKeyIamMemberConditionArgs) ToTagKeyIamMemberConditionOutput

func (i TagKeyIamMemberConditionArgs) ToTagKeyIamMemberConditionOutput() TagKeyIamMemberConditionOutput

func (TagKeyIamMemberConditionArgs) ToTagKeyIamMemberConditionOutputWithContext

func (i TagKeyIamMemberConditionArgs) ToTagKeyIamMemberConditionOutputWithContext(ctx context.Context) TagKeyIamMemberConditionOutput

func (TagKeyIamMemberConditionArgs) ToTagKeyIamMemberConditionPtrOutput

func (i TagKeyIamMemberConditionArgs) ToTagKeyIamMemberConditionPtrOutput() TagKeyIamMemberConditionPtrOutput

func (TagKeyIamMemberConditionArgs) ToTagKeyIamMemberConditionPtrOutputWithContext

func (i TagKeyIamMemberConditionArgs) ToTagKeyIamMemberConditionPtrOutputWithContext(ctx context.Context) TagKeyIamMemberConditionPtrOutput

type TagKeyIamMemberConditionInput

type TagKeyIamMemberConditionInput interface {
	pulumi.Input

	ToTagKeyIamMemberConditionOutput() TagKeyIamMemberConditionOutput
	ToTagKeyIamMemberConditionOutputWithContext(context.Context) TagKeyIamMemberConditionOutput
}

TagKeyIamMemberConditionInput is an input type that accepts TagKeyIamMemberConditionArgs and TagKeyIamMemberConditionOutput values. You can construct a concrete instance of `TagKeyIamMemberConditionInput` via:

TagKeyIamMemberConditionArgs{...}

type TagKeyIamMemberConditionOutput

type TagKeyIamMemberConditionOutput struct{ *pulumi.OutputState }

func (TagKeyIamMemberConditionOutput) Description

func (TagKeyIamMemberConditionOutput) ElementType

func (TagKeyIamMemberConditionOutput) Expression

func (TagKeyIamMemberConditionOutput) Title

func (TagKeyIamMemberConditionOutput) ToOutput added in v6.65.1

func (TagKeyIamMemberConditionOutput) ToTagKeyIamMemberConditionOutput

func (o TagKeyIamMemberConditionOutput) ToTagKeyIamMemberConditionOutput() TagKeyIamMemberConditionOutput

func (TagKeyIamMemberConditionOutput) ToTagKeyIamMemberConditionOutputWithContext

func (o TagKeyIamMemberConditionOutput) ToTagKeyIamMemberConditionOutputWithContext(ctx context.Context) TagKeyIamMemberConditionOutput

func (TagKeyIamMemberConditionOutput) ToTagKeyIamMemberConditionPtrOutput

func (o TagKeyIamMemberConditionOutput) ToTagKeyIamMemberConditionPtrOutput() TagKeyIamMemberConditionPtrOutput

func (TagKeyIamMemberConditionOutput) ToTagKeyIamMemberConditionPtrOutputWithContext

func (o TagKeyIamMemberConditionOutput) ToTagKeyIamMemberConditionPtrOutputWithContext(ctx context.Context) TagKeyIamMemberConditionPtrOutput

type TagKeyIamMemberConditionPtrInput

type TagKeyIamMemberConditionPtrInput interface {
	pulumi.Input

	ToTagKeyIamMemberConditionPtrOutput() TagKeyIamMemberConditionPtrOutput
	ToTagKeyIamMemberConditionPtrOutputWithContext(context.Context) TagKeyIamMemberConditionPtrOutput
}

TagKeyIamMemberConditionPtrInput is an input type that accepts TagKeyIamMemberConditionArgs, TagKeyIamMemberConditionPtr and TagKeyIamMemberConditionPtrOutput values. You can construct a concrete instance of `TagKeyIamMemberConditionPtrInput` via:

        TagKeyIamMemberConditionArgs{...}

or:

        nil

type TagKeyIamMemberConditionPtrOutput

type TagKeyIamMemberConditionPtrOutput struct{ *pulumi.OutputState }

func (TagKeyIamMemberConditionPtrOutput) Description

func (TagKeyIamMemberConditionPtrOutput) Elem

func (TagKeyIamMemberConditionPtrOutput) ElementType

func (TagKeyIamMemberConditionPtrOutput) Expression

func (TagKeyIamMemberConditionPtrOutput) Title

func (TagKeyIamMemberConditionPtrOutput) ToOutput added in v6.65.1

func (TagKeyIamMemberConditionPtrOutput) ToTagKeyIamMemberConditionPtrOutput

func (o TagKeyIamMemberConditionPtrOutput) ToTagKeyIamMemberConditionPtrOutput() TagKeyIamMemberConditionPtrOutput

func (TagKeyIamMemberConditionPtrOutput) ToTagKeyIamMemberConditionPtrOutputWithContext

func (o TagKeyIamMemberConditionPtrOutput) ToTagKeyIamMemberConditionPtrOutputWithContext(ctx context.Context) TagKeyIamMemberConditionPtrOutput

type TagKeyIamMemberInput

type TagKeyIamMemberInput interface {
	pulumi.Input

	ToTagKeyIamMemberOutput() TagKeyIamMemberOutput
	ToTagKeyIamMemberOutputWithContext(ctx context.Context) TagKeyIamMemberOutput
}

type TagKeyIamMemberMap

type TagKeyIamMemberMap map[string]TagKeyIamMemberInput

func (TagKeyIamMemberMap) ElementType

func (TagKeyIamMemberMap) ElementType() reflect.Type

func (TagKeyIamMemberMap) ToOutput added in v6.65.1

func (TagKeyIamMemberMap) ToTagKeyIamMemberMapOutput

func (i TagKeyIamMemberMap) ToTagKeyIamMemberMapOutput() TagKeyIamMemberMapOutput

func (TagKeyIamMemberMap) ToTagKeyIamMemberMapOutputWithContext

func (i TagKeyIamMemberMap) ToTagKeyIamMemberMapOutputWithContext(ctx context.Context) TagKeyIamMemberMapOutput

type TagKeyIamMemberMapInput

type TagKeyIamMemberMapInput interface {
	pulumi.Input

	ToTagKeyIamMemberMapOutput() TagKeyIamMemberMapOutput
	ToTagKeyIamMemberMapOutputWithContext(context.Context) TagKeyIamMemberMapOutput
}

TagKeyIamMemberMapInput is an input type that accepts TagKeyIamMemberMap and TagKeyIamMemberMapOutput values. You can construct a concrete instance of `TagKeyIamMemberMapInput` via:

TagKeyIamMemberMap{ "key": TagKeyIamMemberArgs{...} }

type TagKeyIamMemberMapOutput

type TagKeyIamMemberMapOutput struct{ *pulumi.OutputState }

func (TagKeyIamMemberMapOutput) ElementType

func (TagKeyIamMemberMapOutput) ElementType() reflect.Type

func (TagKeyIamMemberMapOutput) MapIndex

func (TagKeyIamMemberMapOutput) ToOutput added in v6.65.1

func (TagKeyIamMemberMapOutput) ToTagKeyIamMemberMapOutput

func (o TagKeyIamMemberMapOutput) ToTagKeyIamMemberMapOutput() TagKeyIamMemberMapOutput

func (TagKeyIamMemberMapOutput) ToTagKeyIamMemberMapOutputWithContext

func (o TagKeyIamMemberMapOutput) ToTagKeyIamMemberMapOutputWithContext(ctx context.Context) TagKeyIamMemberMapOutput

type TagKeyIamMemberOutput

type TagKeyIamMemberOutput struct{ *pulumi.OutputState }

func (TagKeyIamMemberOutput) Condition added in v6.23.0

func (TagKeyIamMemberOutput) ElementType

func (TagKeyIamMemberOutput) ElementType() reflect.Type

func (TagKeyIamMemberOutput) Etag added in v6.23.0

(Computed) The etag of the IAM policy.

func (TagKeyIamMemberOutput) Member added in v6.23.0

func (TagKeyIamMemberOutput) Role added in v6.23.0

The role that should be applied. Only one `tags.TagKeyIamBinding` can be used per role. Note that custom roles must be of the format `[projects|organizations]/{parent-name}/roles/{role-name}`.

func (TagKeyIamMemberOutput) TagKey added in v6.23.0

Used to find the parent resource to bind the IAM policy to

  • `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values:
  • **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
  • **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
  • **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
  • **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
  • **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
  • **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
  • **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"

func (TagKeyIamMemberOutput) ToOutput added in v6.65.1

func (TagKeyIamMemberOutput) ToTagKeyIamMemberOutput

func (o TagKeyIamMemberOutput) ToTagKeyIamMemberOutput() TagKeyIamMemberOutput

func (TagKeyIamMemberOutput) ToTagKeyIamMemberOutputWithContext

func (o TagKeyIamMemberOutput) ToTagKeyIamMemberOutputWithContext(ctx context.Context) TagKeyIamMemberOutput

type TagKeyIamMemberState

type TagKeyIamMemberState struct {
	Condition TagKeyIamMemberConditionPtrInput
	// (Computed) The etag of the IAM policy.
	Etag   pulumi.StringPtrInput
	Member pulumi.StringPtrInput
	// The role that should be applied. Only one
	// `tags.TagKeyIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringPtrInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagKey pulumi.StringPtrInput
}

func (TagKeyIamMemberState) ElementType

func (TagKeyIamMemberState) ElementType() reflect.Type

type TagKeyIamPolicy

type TagKeyIamPolicy struct {
	pulumi.CustomResourceState

	// (Computed) The etag of the IAM policy.
	Etag pulumi.StringOutput `pulumi:"etag"`
	// The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData pulumi.StringOutput `pulumi:"policyData"`
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagKey pulumi.StringOutput `pulumi:"tagKey"`
}

Three different resources help you manage your IAM policy for Tags TagKey. Each of these resources serves a different use case:

* `tags.TagKeyIamPolicy`: Authoritative. Sets the IAM policy for the tagkey and replaces any existing policy already attached. * `tags.TagKeyIamBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the tagkey are preserved. * `tags.TagKeyIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the tagkey are preserved.

A data source can be used to retrieve policy data in advent you do not need creation

* `tags.TagKeyIamPolicy`: Retrieves the IAM policy for the tagkey

> **Note:** `tags.TagKeyIamPolicy` **cannot** be used in conjunction with `tags.TagKeyIamBinding` and `tags.TagKeyIamMember` or they will fight over what your policy should be.

> **Note:** `tags.TagKeyIamBinding` resources **can be** used in conjunction with `tags.TagKeyIamMember` resources **only if** they do not grant privilege to the same role.

## google\_tags\_tag\_key\_iam\_policy

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []organizations.GetIAMPolicyBinding{
				{
					Role: "roles/viewer",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = tags.NewTagKeyIamPolicy(ctx, "policy", &tags.TagKeyIamPolicyArgs{
			TagKey:     pulumi.Any(google_tags_tag_key.Key.Name),
			PolicyData: *pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_tags\_tag\_key\_iam\_binding

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagKeyIamBinding(ctx, "binding", &tags.TagKeyIamBindingArgs{
			TagKey: pulumi.Any(google_tags_tag_key.Key.Name),
			Role:   pulumi.String("roles/viewer"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_tags\_tag\_key\_iam\_member

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagKeyIamMember(ctx, "member", &tags.TagKeyIamMemberArgs{
			TagKey: pulumi.Any(google_tags_tag_key.Key.Name),
			Role:   pulumi.String("roles/viewer"),
			Member: pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

For all import syntaxes, the "resource in question" can take any of the following forms* tagKeys/{{name}} * {{name}} Any variables not passed in the import command will be taken from the provider configuration. Tags tagkey IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.

```sh

$ pulumi import gcp:tags/tagKeyIamPolicy:TagKeyIamPolicy editor "tagKeys/{{tag_key}} roles/viewer user:jane@example.com"

```

IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.

```sh

$ pulumi import gcp:tags/tagKeyIamPolicy:TagKeyIamPolicy editor "tagKeys/{{tag_key}} roles/viewer"

```

IAM policy imports use the identifier of the resource in question, e.g.

```sh

$ pulumi import gcp:tags/tagKeyIamPolicy:TagKeyIamPolicy editor tagKeys/{{tag_key}}

```

-> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the

full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.

func GetTagKeyIamPolicy

func GetTagKeyIamPolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TagKeyIamPolicyState, opts ...pulumi.ResourceOption) (*TagKeyIamPolicy, error)

GetTagKeyIamPolicy gets an existing TagKeyIamPolicy resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTagKeyIamPolicy

func NewTagKeyIamPolicy(ctx *pulumi.Context,
	name string, args *TagKeyIamPolicyArgs, opts ...pulumi.ResourceOption) (*TagKeyIamPolicy, error)

NewTagKeyIamPolicy registers a new resource with the given unique name, arguments, and options.

func (*TagKeyIamPolicy) ElementType

func (*TagKeyIamPolicy) ElementType() reflect.Type

func (*TagKeyIamPolicy) ToOutput added in v6.65.1

func (*TagKeyIamPolicy) ToTagKeyIamPolicyOutput

func (i *TagKeyIamPolicy) ToTagKeyIamPolicyOutput() TagKeyIamPolicyOutput

func (*TagKeyIamPolicy) ToTagKeyIamPolicyOutputWithContext

func (i *TagKeyIamPolicy) ToTagKeyIamPolicyOutputWithContext(ctx context.Context) TagKeyIamPolicyOutput

type TagKeyIamPolicyArgs

type TagKeyIamPolicyArgs struct {
	// The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData pulumi.StringInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagKey pulumi.StringInput
}

The set of arguments for constructing a TagKeyIamPolicy resource.

func (TagKeyIamPolicyArgs) ElementType

func (TagKeyIamPolicyArgs) ElementType() reflect.Type

type TagKeyIamPolicyArray

type TagKeyIamPolicyArray []TagKeyIamPolicyInput

func (TagKeyIamPolicyArray) ElementType

func (TagKeyIamPolicyArray) ElementType() reflect.Type

func (TagKeyIamPolicyArray) ToOutput added in v6.65.1

func (TagKeyIamPolicyArray) ToTagKeyIamPolicyArrayOutput

func (i TagKeyIamPolicyArray) ToTagKeyIamPolicyArrayOutput() TagKeyIamPolicyArrayOutput

func (TagKeyIamPolicyArray) ToTagKeyIamPolicyArrayOutputWithContext

func (i TagKeyIamPolicyArray) ToTagKeyIamPolicyArrayOutputWithContext(ctx context.Context) TagKeyIamPolicyArrayOutput

type TagKeyIamPolicyArrayInput

type TagKeyIamPolicyArrayInput interface {
	pulumi.Input

	ToTagKeyIamPolicyArrayOutput() TagKeyIamPolicyArrayOutput
	ToTagKeyIamPolicyArrayOutputWithContext(context.Context) TagKeyIamPolicyArrayOutput
}

TagKeyIamPolicyArrayInput is an input type that accepts TagKeyIamPolicyArray and TagKeyIamPolicyArrayOutput values. You can construct a concrete instance of `TagKeyIamPolicyArrayInput` via:

TagKeyIamPolicyArray{ TagKeyIamPolicyArgs{...} }

type TagKeyIamPolicyArrayOutput

type TagKeyIamPolicyArrayOutput struct{ *pulumi.OutputState }

func (TagKeyIamPolicyArrayOutput) ElementType

func (TagKeyIamPolicyArrayOutput) ElementType() reflect.Type

func (TagKeyIamPolicyArrayOutput) Index

func (TagKeyIamPolicyArrayOutput) ToOutput added in v6.65.1

func (TagKeyIamPolicyArrayOutput) ToTagKeyIamPolicyArrayOutput

func (o TagKeyIamPolicyArrayOutput) ToTagKeyIamPolicyArrayOutput() TagKeyIamPolicyArrayOutput

func (TagKeyIamPolicyArrayOutput) ToTagKeyIamPolicyArrayOutputWithContext

func (o TagKeyIamPolicyArrayOutput) ToTagKeyIamPolicyArrayOutputWithContext(ctx context.Context) TagKeyIamPolicyArrayOutput

type TagKeyIamPolicyInput

type TagKeyIamPolicyInput interface {
	pulumi.Input

	ToTagKeyIamPolicyOutput() TagKeyIamPolicyOutput
	ToTagKeyIamPolicyOutputWithContext(ctx context.Context) TagKeyIamPolicyOutput
}

type TagKeyIamPolicyMap

type TagKeyIamPolicyMap map[string]TagKeyIamPolicyInput

func (TagKeyIamPolicyMap) ElementType

func (TagKeyIamPolicyMap) ElementType() reflect.Type

func (TagKeyIamPolicyMap) ToOutput added in v6.65.1

func (TagKeyIamPolicyMap) ToTagKeyIamPolicyMapOutput

func (i TagKeyIamPolicyMap) ToTagKeyIamPolicyMapOutput() TagKeyIamPolicyMapOutput

func (TagKeyIamPolicyMap) ToTagKeyIamPolicyMapOutputWithContext

func (i TagKeyIamPolicyMap) ToTagKeyIamPolicyMapOutputWithContext(ctx context.Context) TagKeyIamPolicyMapOutput

type TagKeyIamPolicyMapInput

type TagKeyIamPolicyMapInput interface {
	pulumi.Input

	ToTagKeyIamPolicyMapOutput() TagKeyIamPolicyMapOutput
	ToTagKeyIamPolicyMapOutputWithContext(context.Context) TagKeyIamPolicyMapOutput
}

TagKeyIamPolicyMapInput is an input type that accepts TagKeyIamPolicyMap and TagKeyIamPolicyMapOutput values. You can construct a concrete instance of `TagKeyIamPolicyMapInput` via:

TagKeyIamPolicyMap{ "key": TagKeyIamPolicyArgs{...} }

type TagKeyIamPolicyMapOutput

type TagKeyIamPolicyMapOutput struct{ *pulumi.OutputState }

func (TagKeyIamPolicyMapOutput) ElementType

func (TagKeyIamPolicyMapOutput) ElementType() reflect.Type

func (TagKeyIamPolicyMapOutput) MapIndex

func (TagKeyIamPolicyMapOutput) ToOutput added in v6.65.1

func (TagKeyIamPolicyMapOutput) ToTagKeyIamPolicyMapOutput

func (o TagKeyIamPolicyMapOutput) ToTagKeyIamPolicyMapOutput() TagKeyIamPolicyMapOutput

func (TagKeyIamPolicyMapOutput) ToTagKeyIamPolicyMapOutputWithContext

func (o TagKeyIamPolicyMapOutput) ToTagKeyIamPolicyMapOutputWithContext(ctx context.Context) TagKeyIamPolicyMapOutput

type TagKeyIamPolicyOutput

type TagKeyIamPolicyOutput struct{ *pulumi.OutputState }

func (TagKeyIamPolicyOutput) ElementType

func (TagKeyIamPolicyOutput) ElementType() reflect.Type

func (TagKeyIamPolicyOutput) Etag added in v6.23.0

(Computed) The etag of the IAM policy.

func (TagKeyIamPolicyOutput) PolicyData added in v6.23.0

func (o TagKeyIamPolicyOutput) PolicyData() pulumi.StringOutput

The policy data generated by a `organizations.getIAMPolicy` data source.

func (TagKeyIamPolicyOutput) TagKey added in v6.23.0

Used to find the parent resource to bind the IAM policy to

  • `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values:
  • **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
  • **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
  • **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
  • **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
  • **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
  • **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
  • **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"

func (TagKeyIamPolicyOutput) ToOutput added in v6.65.1

func (TagKeyIamPolicyOutput) ToTagKeyIamPolicyOutput

func (o TagKeyIamPolicyOutput) ToTagKeyIamPolicyOutput() TagKeyIamPolicyOutput

func (TagKeyIamPolicyOutput) ToTagKeyIamPolicyOutputWithContext

func (o TagKeyIamPolicyOutput) ToTagKeyIamPolicyOutputWithContext(ctx context.Context) TagKeyIamPolicyOutput

type TagKeyIamPolicyState

type TagKeyIamPolicyState struct {
	// (Computed) The etag of the IAM policy.
	Etag pulumi.StringPtrInput
	// The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData pulumi.StringPtrInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagKey pulumi.StringPtrInput
}

func (TagKeyIamPolicyState) ElementType

func (TagKeyIamPolicyState) ElementType() reflect.Type

type TagKeyInput

type TagKeyInput interface {
	pulumi.Input

	ToTagKeyOutput() TagKeyOutput
	ToTagKeyOutputWithContext(ctx context.Context) TagKeyOutput
}

type TagKeyMap

type TagKeyMap map[string]TagKeyInput

func (TagKeyMap) ElementType

func (TagKeyMap) ElementType() reflect.Type

func (TagKeyMap) ToOutput added in v6.65.1

func (i TagKeyMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*TagKey]

func (TagKeyMap) ToTagKeyMapOutput

func (i TagKeyMap) ToTagKeyMapOutput() TagKeyMapOutput

func (TagKeyMap) ToTagKeyMapOutputWithContext

func (i TagKeyMap) ToTagKeyMapOutputWithContext(ctx context.Context) TagKeyMapOutput

type TagKeyMapInput

type TagKeyMapInput interface {
	pulumi.Input

	ToTagKeyMapOutput() TagKeyMapOutput
	ToTagKeyMapOutputWithContext(context.Context) TagKeyMapOutput
}

TagKeyMapInput is an input type that accepts TagKeyMap and TagKeyMapOutput values. You can construct a concrete instance of `TagKeyMapInput` via:

TagKeyMap{ "key": TagKeyArgs{...} }

type TagKeyMapOutput

type TagKeyMapOutput struct{ *pulumi.OutputState }

func (TagKeyMapOutput) ElementType

func (TagKeyMapOutput) ElementType() reflect.Type

func (TagKeyMapOutput) MapIndex

func (TagKeyMapOutput) ToOutput added in v6.65.1

func (o TagKeyMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*TagKey]

func (TagKeyMapOutput) ToTagKeyMapOutput

func (o TagKeyMapOutput) ToTagKeyMapOutput() TagKeyMapOutput

func (TagKeyMapOutput) ToTagKeyMapOutputWithContext

func (o TagKeyMapOutput) ToTagKeyMapOutputWithContext(ctx context.Context) TagKeyMapOutput

type TagKeyOutput

type TagKeyOutput struct{ *pulumi.OutputState }

func (TagKeyOutput) CreateTime added in v6.23.0

func (o TagKeyOutput) CreateTime() pulumi.StringOutput

Output only. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

func (TagKeyOutput) Description added in v6.23.0

func (o TagKeyOutput) Description() pulumi.StringPtrOutput

User-assigned description of the TagKey. Must not exceed 256 characters.

func (TagKeyOutput) ElementType

func (TagKeyOutput) ElementType() reflect.Type

func (TagKeyOutput) Name added in v6.23.0

func (o TagKeyOutput) Name() pulumi.StringOutput

The generated numeric id for the TagKey.

func (TagKeyOutput) NamespacedName added in v6.23.0

func (o TagKeyOutput) NamespacedName() pulumi.StringOutput

Output only. Namespaced name of the TagKey.

func (TagKeyOutput) Parent added in v6.23.0

func (o TagKeyOutput) Parent() pulumi.StringOutput

Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.

func (TagKeyOutput) Purpose added in v6.40.0

func (o TagKeyOutput) Purpose() pulumi.StringPtrOutput

Optional. A purpose cannot be changed once set. A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag. Possible values are: `GCE_FIREWALL`.

func (TagKeyOutput) PurposeData added in v6.40.0

func (o TagKeyOutput) PurposeData() pulumi.StringMapOutput

Optional. Purpose data cannot be changed once set. Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: `network = "<project-name>/<vpc-name>"`.

func (TagKeyOutput) ShortName added in v6.23.0

func (o TagKeyOutput) ShortName() pulumi.StringOutput

Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace. The short name must be 1-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.

***

func (TagKeyOutput) ToOutput added in v6.65.1

func (o TagKeyOutput) ToOutput(ctx context.Context) pulumix.Output[*TagKey]

func (TagKeyOutput) ToTagKeyOutput

func (o TagKeyOutput) ToTagKeyOutput() TagKeyOutput

func (TagKeyOutput) ToTagKeyOutputWithContext

func (o TagKeyOutput) ToTagKeyOutputWithContext(ctx context.Context) TagKeyOutput

func (TagKeyOutput) UpdateTime added in v6.23.0

func (o TagKeyOutput) UpdateTime() pulumi.StringOutput

Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

type TagKeyState

type TagKeyState struct {
	// Output only. Creation time.
	// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
	CreateTime pulumi.StringPtrInput
	// User-assigned description of the TagKey. Must not exceed 256 characters.
	Description pulumi.StringPtrInput
	// The generated numeric id for the TagKey.
	Name pulumi.StringPtrInput
	// Output only. Namespaced name of the TagKey.
	NamespacedName pulumi.StringPtrInput
	// Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
	Parent pulumi.StringPtrInput
	// Optional. A purpose cannot be changed once set.
	// A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag.
	// Possible values are: `GCE_FIREWALL`.
	Purpose pulumi.StringPtrInput
	// Optional. Purpose data cannot be changed once set.
	// Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: `network = "<project-name>/<vpc-name>"`.
	PurposeData pulumi.StringMapInput
	// Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace.
	// The short name must be 1-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
	//
	// ***
	ShortName pulumi.StringPtrInput
	// Output only. Update time.
	// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
	UpdateTime pulumi.StringPtrInput
}

func (TagKeyState) ElementType

func (TagKeyState) ElementType() reflect.Type

type TagValue

type TagValue struct {
	pulumi.CustomResourceState

	// Output only. Creation time.
	// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
	CreateTime pulumi.StringOutput `pulumi:"createTime"`
	// User-assigned description of the TagValue. Must not exceed 256 characters.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// The generated numeric id for the TagValue.
	Name pulumi.StringOutput `pulumi:"name"`
	// Output only. Namespaced name of the TagValue. Will be in the format {parentNamespace}/{tagKeyShortName}/{shortName}.
	NamespacedName pulumi.StringOutput `pulumi:"namespacedName"`
	// Input only. The resource name of the new TagValue's parent. Must be of the form tagKeys/{tag_key_id}.
	Parent pulumi.StringOutput `pulumi:"parent"`
	// Input only. User-assigned short name for TagValue. The short name should be unique for TagValues within the same parent TagKey.
	// The short name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
	//
	// ***
	ShortName pulumi.StringOutput `pulumi:"shortName"`
	// Output only. Update time.
	// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
	UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
}

A TagValue is a child of a particular TagKey. TagValues are used to group cloud resources for the purpose of controlling them using policies.

To get more information about TagValue, see:

* [API documentation](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues) * How-to Guides

## Example Usage ### Tag Value Basic

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		key, err := tags.NewTagKey(ctx, "key", &tags.TagKeyArgs{
			Description: pulumi.String("For keyname resources."),
			Parent:      pulumi.String("organizations/123456789"),
			ShortName:   pulumi.String("keyname"),
		})
		if err != nil {
			return err
		}
		_, err = tags.NewTagValue(ctx, "value", &tags.TagValueArgs{
			Description: pulumi.String("For valuename resources."),
			Parent: key.Name.ApplyT(func(name string) (string, error) {
				return fmt.Sprintf("tagKeys/%v", name), nil
			}).(pulumi.StringOutput),
			ShortName: pulumi.String("valuename"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

TagValue can be imported using any of these accepted formats

```sh

$ pulumi import gcp:tags/tagValue:TagValue default tagValues/{{name}}

```

```sh

$ pulumi import gcp:tags/tagValue:TagValue default {{name}}

```

func GetTagValue

func GetTagValue(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TagValueState, opts ...pulumi.ResourceOption) (*TagValue, error)

GetTagValue gets an existing TagValue resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTagValue

func NewTagValue(ctx *pulumi.Context,
	name string, args *TagValueArgs, opts ...pulumi.ResourceOption) (*TagValue, error)

NewTagValue registers a new resource with the given unique name, arguments, and options.

func (*TagValue) ElementType

func (*TagValue) ElementType() reflect.Type

func (*TagValue) ToOutput added in v6.65.1

func (i *TagValue) ToOutput(ctx context.Context) pulumix.Output[*TagValue]

func (*TagValue) ToTagValueOutput

func (i *TagValue) ToTagValueOutput() TagValueOutput

func (*TagValue) ToTagValueOutputWithContext

func (i *TagValue) ToTagValueOutputWithContext(ctx context.Context) TagValueOutput

type TagValueArgs

type TagValueArgs struct {
	// User-assigned description of the TagValue. Must not exceed 256 characters.
	Description pulumi.StringPtrInput
	// Input only. The resource name of the new TagValue's parent. Must be of the form tagKeys/{tag_key_id}.
	Parent pulumi.StringInput
	// Input only. User-assigned short name for TagValue. The short name should be unique for TagValues within the same parent TagKey.
	// The short name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
	//
	// ***
	ShortName pulumi.StringInput
}

The set of arguments for constructing a TagValue resource.

func (TagValueArgs) ElementType

func (TagValueArgs) ElementType() reflect.Type

type TagValueArray

type TagValueArray []TagValueInput

func (TagValueArray) ElementType

func (TagValueArray) ElementType() reflect.Type

func (TagValueArray) ToOutput added in v6.65.1

func (i TagValueArray) ToOutput(ctx context.Context) pulumix.Output[[]*TagValue]

func (TagValueArray) ToTagValueArrayOutput

func (i TagValueArray) ToTagValueArrayOutput() TagValueArrayOutput

func (TagValueArray) ToTagValueArrayOutputWithContext

func (i TagValueArray) ToTagValueArrayOutputWithContext(ctx context.Context) TagValueArrayOutput

type TagValueArrayInput

type TagValueArrayInput interface {
	pulumi.Input

	ToTagValueArrayOutput() TagValueArrayOutput
	ToTagValueArrayOutputWithContext(context.Context) TagValueArrayOutput
}

TagValueArrayInput is an input type that accepts TagValueArray and TagValueArrayOutput values. You can construct a concrete instance of `TagValueArrayInput` via:

TagValueArray{ TagValueArgs{...} }

type TagValueArrayOutput

type TagValueArrayOutput struct{ *pulumi.OutputState }

func (TagValueArrayOutput) ElementType

func (TagValueArrayOutput) ElementType() reflect.Type

func (TagValueArrayOutput) Index

func (TagValueArrayOutput) ToOutput added in v6.65.1

func (TagValueArrayOutput) ToTagValueArrayOutput

func (o TagValueArrayOutput) ToTagValueArrayOutput() TagValueArrayOutput

func (TagValueArrayOutput) ToTagValueArrayOutputWithContext

func (o TagValueArrayOutput) ToTagValueArrayOutputWithContext(ctx context.Context) TagValueArrayOutput

type TagValueIamBinding

type TagValueIamBinding struct {
	pulumi.CustomResourceState

	Condition TagValueIamBindingConditionPtrOutput `pulumi:"condition"`
	// (Computed) The etag of the IAM policy.
	Etag    pulumi.StringOutput      `pulumi:"etag"`
	Members pulumi.StringArrayOutput `pulumi:"members"`
	// The role that should be applied. Only one
	// `tags.TagValueIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringOutput `pulumi:"role"`
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagValue pulumi.StringOutput `pulumi:"tagValue"`
}

Three different resources help you manage your IAM policy for Tags TagValue. Each of these resources serves a different use case:

* `tags.TagValueIamPolicy`: Authoritative. Sets the IAM policy for the tagvalue and replaces any existing policy already attached. * `tags.TagValueIamBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the tagvalue are preserved. * `tags.TagValueIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the tagvalue are preserved.

A data source can be used to retrieve policy data in advent you do not need creation

* `tags.TagValueIamPolicy`: Retrieves the IAM policy for the tagvalue

> **Note:** `tags.TagValueIamPolicy` **cannot** be used in conjunction with `tags.TagValueIamBinding` and `tags.TagValueIamMember` or they will fight over what your policy should be.

> **Note:** `tags.TagValueIamBinding` resources **can be** used in conjunction with `tags.TagValueIamMember` resources **only if** they do not grant privilege to the same role.

## google\_tags\_tag\_value\_iam\_policy

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []organizations.GetIAMPolicyBinding{
				{
					Role: "roles/viewer",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = tags.NewTagValueIamPolicy(ctx, "policy", &tags.TagValueIamPolicyArgs{
			TagValue:   pulumi.Any(google_tags_tag_value.Value.Name),
			PolicyData: *pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_tags\_tag\_value\_iam\_binding

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagValueIamBinding(ctx, "binding", &tags.TagValueIamBindingArgs{
			TagValue: pulumi.Any(google_tags_tag_value.Value.Name),
			Role:     pulumi.String("roles/viewer"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_tags\_tag\_value\_iam\_member

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagValueIamMember(ctx, "member", &tags.TagValueIamMemberArgs{
			TagValue: pulumi.Any(google_tags_tag_value.Value.Name),
			Role:     pulumi.String("roles/viewer"),
			Member:   pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

For all import syntaxes, the "resource in question" can take any of the following forms* tagValues/{{name}} * {{name}} Any variables not passed in the import command will be taken from the provider configuration. Tags tagvalue IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.

```sh

$ pulumi import gcp:tags/tagValueIamBinding:TagValueIamBinding editor "tagValues/{{tag_value}} roles/viewer user:jane@example.com"

```

IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.

```sh

$ pulumi import gcp:tags/tagValueIamBinding:TagValueIamBinding editor "tagValues/{{tag_value}} roles/viewer"

```

IAM policy imports use the identifier of the resource in question, e.g.

```sh

$ pulumi import gcp:tags/tagValueIamBinding:TagValueIamBinding editor tagValues/{{tag_value}}

```

-> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the

full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.

func GetTagValueIamBinding

func GetTagValueIamBinding(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TagValueIamBindingState, opts ...pulumi.ResourceOption) (*TagValueIamBinding, error)

GetTagValueIamBinding gets an existing TagValueIamBinding resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTagValueIamBinding

func NewTagValueIamBinding(ctx *pulumi.Context,
	name string, args *TagValueIamBindingArgs, opts ...pulumi.ResourceOption) (*TagValueIamBinding, error)

NewTagValueIamBinding registers a new resource with the given unique name, arguments, and options.

func (*TagValueIamBinding) ElementType

func (*TagValueIamBinding) ElementType() reflect.Type

func (*TagValueIamBinding) ToOutput added in v6.65.1

func (*TagValueIamBinding) ToTagValueIamBindingOutput

func (i *TagValueIamBinding) ToTagValueIamBindingOutput() TagValueIamBindingOutput

func (*TagValueIamBinding) ToTagValueIamBindingOutputWithContext

func (i *TagValueIamBinding) ToTagValueIamBindingOutputWithContext(ctx context.Context) TagValueIamBindingOutput

type TagValueIamBindingArgs

type TagValueIamBindingArgs struct {
	Condition TagValueIamBindingConditionPtrInput
	Members   pulumi.StringArrayInput
	// The role that should be applied. Only one
	// `tags.TagValueIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagValue pulumi.StringInput
}

The set of arguments for constructing a TagValueIamBinding resource.

func (TagValueIamBindingArgs) ElementType

func (TagValueIamBindingArgs) ElementType() reflect.Type

type TagValueIamBindingArray

type TagValueIamBindingArray []TagValueIamBindingInput

func (TagValueIamBindingArray) ElementType

func (TagValueIamBindingArray) ElementType() reflect.Type

func (TagValueIamBindingArray) ToOutput added in v6.65.1

func (TagValueIamBindingArray) ToTagValueIamBindingArrayOutput

func (i TagValueIamBindingArray) ToTagValueIamBindingArrayOutput() TagValueIamBindingArrayOutput

func (TagValueIamBindingArray) ToTagValueIamBindingArrayOutputWithContext

func (i TagValueIamBindingArray) ToTagValueIamBindingArrayOutputWithContext(ctx context.Context) TagValueIamBindingArrayOutput

type TagValueIamBindingArrayInput

type TagValueIamBindingArrayInput interface {
	pulumi.Input

	ToTagValueIamBindingArrayOutput() TagValueIamBindingArrayOutput
	ToTagValueIamBindingArrayOutputWithContext(context.Context) TagValueIamBindingArrayOutput
}

TagValueIamBindingArrayInput is an input type that accepts TagValueIamBindingArray and TagValueIamBindingArrayOutput values. You can construct a concrete instance of `TagValueIamBindingArrayInput` via:

TagValueIamBindingArray{ TagValueIamBindingArgs{...} }

type TagValueIamBindingArrayOutput

type TagValueIamBindingArrayOutput struct{ *pulumi.OutputState }

func (TagValueIamBindingArrayOutput) ElementType

func (TagValueIamBindingArrayOutput) Index

func (TagValueIamBindingArrayOutput) ToOutput added in v6.65.1

func (TagValueIamBindingArrayOutput) ToTagValueIamBindingArrayOutput

func (o TagValueIamBindingArrayOutput) ToTagValueIamBindingArrayOutput() TagValueIamBindingArrayOutput

func (TagValueIamBindingArrayOutput) ToTagValueIamBindingArrayOutputWithContext

func (o TagValueIamBindingArrayOutput) ToTagValueIamBindingArrayOutputWithContext(ctx context.Context) TagValueIamBindingArrayOutput

type TagValueIamBindingCondition

type TagValueIamBindingCondition struct {
	Description *string `pulumi:"description"`
	Expression  string  `pulumi:"expression"`
	Title       string  `pulumi:"title"`
}

type TagValueIamBindingConditionArgs

type TagValueIamBindingConditionArgs struct {
	Description pulumi.StringPtrInput `pulumi:"description"`
	Expression  pulumi.StringInput    `pulumi:"expression"`
	Title       pulumi.StringInput    `pulumi:"title"`
}

func (TagValueIamBindingConditionArgs) ElementType

func (TagValueIamBindingConditionArgs) ToOutput added in v6.65.1

func (TagValueIamBindingConditionArgs) ToTagValueIamBindingConditionOutput

func (i TagValueIamBindingConditionArgs) ToTagValueIamBindingConditionOutput() TagValueIamBindingConditionOutput

func (TagValueIamBindingConditionArgs) ToTagValueIamBindingConditionOutputWithContext

func (i TagValueIamBindingConditionArgs) ToTagValueIamBindingConditionOutputWithContext(ctx context.Context) TagValueIamBindingConditionOutput

func (TagValueIamBindingConditionArgs) ToTagValueIamBindingConditionPtrOutput

func (i TagValueIamBindingConditionArgs) ToTagValueIamBindingConditionPtrOutput() TagValueIamBindingConditionPtrOutput

func (TagValueIamBindingConditionArgs) ToTagValueIamBindingConditionPtrOutputWithContext

func (i TagValueIamBindingConditionArgs) ToTagValueIamBindingConditionPtrOutputWithContext(ctx context.Context) TagValueIamBindingConditionPtrOutput

type TagValueIamBindingConditionInput

type TagValueIamBindingConditionInput interface {
	pulumi.Input

	ToTagValueIamBindingConditionOutput() TagValueIamBindingConditionOutput
	ToTagValueIamBindingConditionOutputWithContext(context.Context) TagValueIamBindingConditionOutput
}

TagValueIamBindingConditionInput is an input type that accepts TagValueIamBindingConditionArgs and TagValueIamBindingConditionOutput values. You can construct a concrete instance of `TagValueIamBindingConditionInput` via:

TagValueIamBindingConditionArgs{...}

type TagValueIamBindingConditionOutput

type TagValueIamBindingConditionOutput struct{ *pulumi.OutputState }

func (TagValueIamBindingConditionOutput) Description

func (TagValueIamBindingConditionOutput) ElementType

func (TagValueIamBindingConditionOutput) Expression

func (TagValueIamBindingConditionOutput) Title

func (TagValueIamBindingConditionOutput) ToOutput added in v6.65.1

func (TagValueIamBindingConditionOutput) ToTagValueIamBindingConditionOutput

func (o TagValueIamBindingConditionOutput) ToTagValueIamBindingConditionOutput() TagValueIamBindingConditionOutput

func (TagValueIamBindingConditionOutput) ToTagValueIamBindingConditionOutputWithContext

func (o TagValueIamBindingConditionOutput) ToTagValueIamBindingConditionOutputWithContext(ctx context.Context) TagValueIamBindingConditionOutput

func (TagValueIamBindingConditionOutput) ToTagValueIamBindingConditionPtrOutput

func (o TagValueIamBindingConditionOutput) ToTagValueIamBindingConditionPtrOutput() TagValueIamBindingConditionPtrOutput

func (TagValueIamBindingConditionOutput) ToTagValueIamBindingConditionPtrOutputWithContext

func (o TagValueIamBindingConditionOutput) ToTagValueIamBindingConditionPtrOutputWithContext(ctx context.Context) TagValueIamBindingConditionPtrOutput

type TagValueIamBindingConditionPtrInput

type TagValueIamBindingConditionPtrInput interface {
	pulumi.Input

	ToTagValueIamBindingConditionPtrOutput() TagValueIamBindingConditionPtrOutput
	ToTagValueIamBindingConditionPtrOutputWithContext(context.Context) TagValueIamBindingConditionPtrOutput
}

TagValueIamBindingConditionPtrInput is an input type that accepts TagValueIamBindingConditionArgs, TagValueIamBindingConditionPtr and TagValueIamBindingConditionPtrOutput values. You can construct a concrete instance of `TagValueIamBindingConditionPtrInput` via:

        TagValueIamBindingConditionArgs{...}

or:

        nil

type TagValueIamBindingConditionPtrOutput

type TagValueIamBindingConditionPtrOutput struct{ *pulumi.OutputState }

func (TagValueIamBindingConditionPtrOutput) Description

func (TagValueIamBindingConditionPtrOutput) Elem

func (TagValueIamBindingConditionPtrOutput) ElementType

func (TagValueIamBindingConditionPtrOutput) Expression

func (TagValueIamBindingConditionPtrOutput) Title

func (TagValueIamBindingConditionPtrOutput) ToOutput added in v6.65.1

func (TagValueIamBindingConditionPtrOutput) ToTagValueIamBindingConditionPtrOutput

func (o TagValueIamBindingConditionPtrOutput) ToTagValueIamBindingConditionPtrOutput() TagValueIamBindingConditionPtrOutput

func (TagValueIamBindingConditionPtrOutput) ToTagValueIamBindingConditionPtrOutputWithContext

func (o TagValueIamBindingConditionPtrOutput) ToTagValueIamBindingConditionPtrOutputWithContext(ctx context.Context) TagValueIamBindingConditionPtrOutput

type TagValueIamBindingInput

type TagValueIamBindingInput interface {
	pulumi.Input

	ToTagValueIamBindingOutput() TagValueIamBindingOutput
	ToTagValueIamBindingOutputWithContext(ctx context.Context) TagValueIamBindingOutput
}

type TagValueIamBindingMap

type TagValueIamBindingMap map[string]TagValueIamBindingInput

func (TagValueIamBindingMap) ElementType

func (TagValueIamBindingMap) ElementType() reflect.Type

func (TagValueIamBindingMap) ToOutput added in v6.65.1

func (TagValueIamBindingMap) ToTagValueIamBindingMapOutput

func (i TagValueIamBindingMap) ToTagValueIamBindingMapOutput() TagValueIamBindingMapOutput

func (TagValueIamBindingMap) ToTagValueIamBindingMapOutputWithContext

func (i TagValueIamBindingMap) ToTagValueIamBindingMapOutputWithContext(ctx context.Context) TagValueIamBindingMapOutput

type TagValueIamBindingMapInput

type TagValueIamBindingMapInput interface {
	pulumi.Input

	ToTagValueIamBindingMapOutput() TagValueIamBindingMapOutput
	ToTagValueIamBindingMapOutputWithContext(context.Context) TagValueIamBindingMapOutput
}

TagValueIamBindingMapInput is an input type that accepts TagValueIamBindingMap and TagValueIamBindingMapOutput values. You can construct a concrete instance of `TagValueIamBindingMapInput` via:

TagValueIamBindingMap{ "key": TagValueIamBindingArgs{...} }

type TagValueIamBindingMapOutput

type TagValueIamBindingMapOutput struct{ *pulumi.OutputState }

func (TagValueIamBindingMapOutput) ElementType

func (TagValueIamBindingMapOutput) MapIndex

func (TagValueIamBindingMapOutput) ToOutput added in v6.65.1

func (TagValueIamBindingMapOutput) ToTagValueIamBindingMapOutput

func (o TagValueIamBindingMapOutput) ToTagValueIamBindingMapOutput() TagValueIamBindingMapOutput

func (TagValueIamBindingMapOutput) ToTagValueIamBindingMapOutputWithContext

func (o TagValueIamBindingMapOutput) ToTagValueIamBindingMapOutputWithContext(ctx context.Context) TagValueIamBindingMapOutput

type TagValueIamBindingOutput

type TagValueIamBindingOutput struct{ *pulumi.OutputState }

func (TagValueIamBindingOutput) Condition added in v6.23.0

func (TagValueIamBindingOutput) ElementType

func (TagValueIamBindingOutput) ElementType() reflect.Type

func (TagValueIamBindingOutput) Etag added in v6.23.0

(Computed) The etag of the IAM policy.

func (TagValueIamBindingOutput) Members added in v6.23.0

func (TagValueIamBindingOutput) Role added in v6.23.0

The role that should be applied. Only one `tags.TagValueIamBinding` can be used per role. Note that custom roles must be of the format `[projects|organizations]/{parent-name}/roles/{role-name}`.

func (TagValueIamBindingOutput) TagValue added in v6.23.0

Used to find the parent resource to bind the IAM policy to

  • `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values:
  • **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
  • **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
  • **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
  • **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
  • **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
  • **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
  • **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"

func (TagValueIamBindingOutput) ToOutput added in v6.65.1

func (TagValueIamBindingOutput) ToTagValueIamBindingOutput

func (o TagValueIamBindingOutput) ToTagValueIamBindingOutput() TagValueIamBindingOutput

func (TagValueIamBindingOutput) ToTagValueIamBindingOutputWithContext

func (o TagValueIamBindingOutput) ToTagValueIamBindingOutputWithContext(ctx context.Context) TagValueIamBindingOutput

type TagValueIamBindingState

type TagValueIamBindingState struct {
	Condition TagValueIamBindingConditionPtrInput
	// (Computed) The etag of the IAM policy.
	Etag    pulumi.StringPtrInput
	Members pulumi.StringArrayInput
	// The role that should be applied. Only one
	// `tags.TagValueIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringPtrInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagValue pulumi.StringPtrInput
}

func (TagValueIamBindingState) ElementType

func (TagValueIamBindingState) ElementType() reflect.Type

type TagValueIamMember

type TagValueIamMember struct {
	pulumi.CustomResourceState

	Condition TagValueIamMemberConditionPtrOutput `pulumi:"condition"`
	// (Computed) The etag of the IAM policy.
	Etag   pulumi.StringOutput `pulumi:"etag"`
	Member pulumi.StringOutput `pulumi:"member"`
	// The role that should be applied. Only one
	// `tags.TagValueIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringOutput `pulumi:"role"`
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagValue pulumi.StringOutput `pulumi:"tagValue"`
}

Three different resources help you manage your IAM policy for Tags TagValue. Each of these resources serves a different use case:

* `tags.TagValueIamPolicy`: Authoritative. Sets the IAM policy for the tagvalue and replaces any existing policy already attached. * `tags.TagValueIamBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the tagvalue are preserved. * `tags.TagValueIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the tagvalue are preserved.

A data source can be used to retrieve policy data in advent you do not need creation

* `tags.TagValueIamPolicy`: Retrieves the IAM policy for the tagvalue

> **Note:** `tags.TagValueIamPolicy` **cannot** be used in conjunction with `tags.TagValueIamBinding` and `tags.TagValueIamMember` or they will fight over what your policy should be.

> **Note:** `tags.TagValueIamBinding` resources **can be** used in conjunction with `tags.TagValueIamMember` resources **only if** they do not grant privilege to the same role.

## google\_tags\_tag\_value\_iam\_policy

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []organizations.GetIAMPolicyBinding{
				{
					Role: "roles/viewer",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = tags.NewTagValueIamPolicy(ctx, "policy", &tags.TagValueIamPolicyArgs{
			TagValue:   pulumi.Any(google_tags_tag_value.Value.Name),
			PolicyData: *pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_tags\_tag\_value\_iam\_binding

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagValueIamBinding(ctx, "binding", &tags.TagValueIamBindingArgs{
			TagValue: pulumi.Any(google_tags_tag_value.Value.Name),
			Role:     pulumi.String("roles/viewer"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_tags\_tag\_value\_iam\_member

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagValueIamMember(ctx, "member", &tags.TagValueIamMemberArgs{
			TagValue: pulumi.Any(google_tags_tag_value.Value.Name),
			Role:     pulumi.String("roles/viewer"),
			Member:   pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

For all import syntaxes, the "resource in question" can take any of the following forms* tagValues/{{name}} * {{name}} Any variables not passed in the import command will be taken from the provider configuration. Tags tagvalue IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.

```sh

$ pulumi import gcp:tags/tagValueIamMember:TagValueIamMember editor "tagValues/{{tag_value}} roles/viewer user:jane@example.com"

```

IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.

```sh

$ pulumi import gcp:tags/tagValueIamMember:TagValueIamMember editor "tagValues/{{tag_value}} roles/viewer"

```

IAM policy imports use the identifier of the resource in question, e.g.

```sh

$ pulumi import gcp:tags/tagValueIamMember:TagValueIamMember editor tagValues/{{tag_value}}

```

-> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the

full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.

func GetTagValueIamMember

func GetTagValueIamMember(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TagValueIamMemberState, opts ...pulumi.ResourceOption) (*TagValueIamMember, error)

GetTagValueIamMember gets an existing TagValueIamMember resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTagValueIamMember

func NewTagValueIamMember(ctx *pulumi.Context,
	name string, args *TagValueIamMemberArgs, opts ...pulumi.ResourceOption) (*TagValueIamMember, error)

NewTagValueIamMember registers a new resource with the given unique name, arguments, and options.

func (*TagValueIamMember) ElementType

func (*TagValueIamMember) ElementType() reflect.Type

func (*TagValueIamMember) ToOutput added in v6.65.1

func (*TagValueIamMember) ToTagValueIamMemberOutput

func (i *TagValueIamMember) ToTagValueIamMemberOutput() TagValueIamMemberOutput

func (*TagValueIamMember) ToTagValueIamMemberOutputWithContext

func (i *TagValueIamMember) ToTagValueIamMemberOutputWithContext(ctx context.Context) TagValueIamMemberOutput

type TagValueIamMemberArgs

type TagValueIamMemberArgs struct {
	Condition TagValueIamMemberConditionPtrInput
	Member    pulumi.StringInput
	// The role that should be applied. Only one
	// `tags.TagValueIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagValue pulumi.StringInput
}

The set of arguments for constructing a TagValueIamMember resource.

func (TagValueIamMemberArgs) ElementType

func (TagValueIamMemberArgs) ElementType() reflect.Type

type TagValueIamMemberArray

type TagValueIamMemberArray []TagValueIamMemberInput

func (TagValueIamMemberArray) ElementType

func (TagValueIamMemberArray) ElementType() reflect.Type

func (TagValueIamMemberArray) ToOutput added in v6.65.1

func (TagValueIamMemberArray) ToTagValueIamMemberArrayOutput

func (i TagValueIamMemberArray) ToTagValueIamMemberArrayOutput() TagValueIamMemberArrayOutput

func (TagValueIamMemberArray) ToTagValueIamMemberArrayOutputWithContext

func (i TagValueIamMemberArray) ToTagValueIamMemberArrayOutputWithContext(ctx context.Context) TagValueIamMemberArrayOutput

type TagValueIamMemberArrayInput

type TagValueIamMemberArrayInput interface {
	pulumi.Input

	ToTagValueIamMemberArrayOutput() TagValueIamMemberArrayOutput
	ToTagValueIamMemberArrayOutputWithContext(context.Context) TagValueIamMemberArrayOutput
}

TagValueIamMemberArrayInput is an input type that accepts TagValueIamMemberArray and TagValueIamMemberArrayOutput values. You can construct a concrete instance of `TagValueIamMemberArrayInput` via:

TagValueIamMemberArray{ TagValueIamMemberArgs{...} }

type TagValueIamMemberArrayOutput

type TagValueIamMemberArrayOutput struct{ *pulumi.OutputState }

func (TagValueIamMemberArrayOutput) ElementType

func (TagValueIamMemberArrayOutput) Index

func (TagValueIamMemberArrayOutput) ToOutput added in v6.65.1

func (TagValueIamMemberArrayOutput) ToTagValueIamMemberArrayOutput

func (o TagValueIamMemberArrayOutput) ToTagValueIamMemberArrayOutput() TagValueIamMemberArrayOutput

func (TagValueIamMemberArrayOutput) ToTagValueIamMemberArrayOutputWithContext

func (o TagValueIamMemberArrayOutput) ToTagValueIamMemberArrayOutputWithContext(ctx context.Context) TagValueIamMemberArrayOutput

type TagValueIamMemberCondition

type TagValueIamMemberCondition struct {
	Description *string `pulumi:"description"`
	Expression  string  `pulumi:"expression"`
	Title       string  `pulumi:"title"`
}

type TagValueIamMemberConditionArgs

type TagValueIamMemberConditionArgs struct {
	Description pulumi.StringPtrInput `pulumi:"description"`
	Expression  pulumi.StringInput    `pulumi:"expression"`
	Title       pulumi.StringInput    `pulumi:"title"`
}

func (TagValueIamMemberConditionArgs) ElementType

func (TagValueIamMemberConditionArgs) ToOutput added in v6.65.1

func (TagValueIamMemberConditionArgs) ToTagValueIamMemberConditionOutput

func (i TagValueIamMemberConditionArgs) ToTagValueIamMemberConditionOutput() TagValueIamMemberConditionOutput

func (TagValueIamMemberConditionArgs) ToTagValueIamMemberConditionOutputWithContext

func (i TagValueIamMemberConditionArgs) ToTagValueIamMemberConditionOutputWithContext(ctx context.Context) TagValueIamMemberConditionOutput

func (TagValueIamMemberConditionArgs) ToTagValueIamMemberConditionPtrOutput

func (i TagValueIamMemberConditionArgs) ToTagValueIamMemberConditionPtrOutput() TagValueIamMemberConditionPtrOutput

func (TagValueIamMemberConditionArgs) ToTagValueIamMemberConditionPtrOutputWithContext

func (i TagValueIamMemberConditionArgs) ToTagValueIamMemberConditionPtrOutputWithContext(ctx context.Context) TagValueIamMemberConditionPtrOutput

type TagValueIamMemberConditionInput

type TagValueIamMemberConditionInput interface {
	pulumi.Input

	ToTagValueIamMemberConditionOutput() TagValueIamMemberConditionOutput
	ToTagValueIamMemberConditionOutputWithContext(context.Context) TagValueIamMemberConditionOutput
}

TagValueIamMemberConditionInput is an input type that accepts TagValueIamMemberConditionArgs and TagValueIamMemberConditionOutput values. You can construct a concrete instance of `TagValueIamMemberConditionInput` via:

TagValueIamMemberConditionArgs{...}

type TagValueIamMemberConditionOutput

type TagValueIamMemberConditionOutput struct{ *pulumi.OutputState }

func (TagValueIamMemberConditionOutput) Description

func (TagValueIamMemberConditionOutput) ElementType

func (TagValueIamMemberConditionOutput) Expression

func (TagValueIamMemberConditionOutput) Title

func (TagValueIamMemberConditionOutput) ToOutput added in v6.65.1

func (TagValueIamMemberConditionOutput) ToTagValueIamMemberConditionOutput

func (o TagValueIamMemberConditionOutput) ToTagValueIamMemberConditionOutput() TagValueIamMemberConditionOutput

func (TagValueIamMemberConditionOutput) ToTagValueIamMemberConditionOutputWithContext

func (o TagValueIamMemberConditionOutput) ToTagValueIamMemberConditionOutputWithContext(ctx context.Context) TagValueIamMemberConditionOutput

func (TagValueIamMemberConditionOutput) ToTagValueIamMemberConditionPtrOutput

func (o TagValueIamMemberConditionOutput) ToTagValueIamMemberConditionPtrOutput() TagValueIamMemberConditionPtrOutput

func (TagValueIamMemberConditionOutput) ToTagValueIamMemberConditionPtrOutputWithContext

func (o TagValueIamMemberConditionOutput) ToTagValueIamMemberConditionPtrOutputWithContext(ctx context.Context) TagValueIamMemberConditionPtrOutput

type TagValueIamMemberConditionPtrInput

type TagValueIamMemberConditionPtrInput interface {
	pulumi.Input

	ToTagValueIamMemberConditionPtrOutput() TagValueIamMemberConditionPtrOutput
	ToTagValueIamMemberConditionPtrOutputWithContext(context.Context) TagValueIamMemberConditionPtrOutput
}

TagValueIamMemberConditionPtrInput is an input type that accepts TagValueIamMemberConditionArgs, TagValueIamMemberConditionPtr and TagValueIamMemberConditionPtrOutput values. You can construct a concrete instance of `TagValueIamMemberConditionPtrInput` via:

        TagValueIamMemberConditionArgs{...}

or:

        nil

type TagValueIamMemberConditionPtrOutput

type TagValueIamMemberConditionPtrOutput struct{ *pulumi.OutputState }

func (TagValueIamMemberConditionPtrOutput) Description

func (TagValueIamMemberConditionPtrOutput) Elem

func (TagValueIamMemberConditionPtrOutput) ElementType

func (TagValueIamMemberConditionPtrOutput) Expression

func (TagValueIamMemberConditionPtrOutput) Title

func (TagValueIamMemberConditionPtrOutput) ToOutput added in v6.65.1

func (TagValueIamMemberConditionPtrOutput) ToTagValueIamMemberConditionPtrOutput

func (o TagValueIamMemberConditionPtrOutput) ToTagValueIamMemberConditionPtrOutput() TagValueIamMemberConditionPtrOutput

func (TagValueIamMemberConditionPtrOutput) ToTagValueIamMemberConditionPtrOutputWithContext

func (o TagValueIamMemberConditionPtrOutput) ToTagValueIamMemberConditionPtrOutputWithContext(ctx context.Context) TagValueIamMemberConditionPtrOutput

type TagValueIamMemberInput

type TagValueIamMemberInput interface {
	pulumi.Input

	ToTagValueIamMemberOutput() TagValueIamMemberOutput
	ToTagValueIamMemberOutputWithContext(ctx context.Context) TagValueIamMemberOutput
}

type TagValueIamMemberMap

type TagValueIamMemberMap map[string]TagValueIamMemberInput

func (TagValueIamMemberMap) ElementType

func (TagValueIamMemberMap) ElementType() reflect.Type

func (TagValueIamMemberMap) ToOutput added in v6.65.1

func (TagValueIamMemberMap) ToTagValueIamMemberMapOutput

func (i TagValueIamMemberMap) ToTagValueIamMemberMapOutput() TagValueIamMemberMapOutput

func (TagValueIamMemberMap) ToTagValueIamMemberMapOutputWithContext

func (i TagValueIamMemberMap) ToTagValueIamMemberMapOutputWithContext(ctx context.Context) TagValueIamMemberMapOutput

type TagValueIamMemberMapInput

type TagValueIamMemberMapInput interface {
	pulumi.Input

	ToTagValueIamMemberMapOutput() TagValueIamMemberMapOutput
	ToTagValueIamMemberMapOutputWithContext(context.Context) TagValueIamMemberMapOutput
}

TagValueIamMemberMapInput is an input type that accepts TagValueIamMemberMap and TagValueIamMemberMapOutput values. You can construct a concrete instance of `TagValueIamMemberMapInput` via:

TagValueIamMemberMap{ "key": TagValueIamMemberArgs{...} }

type TagValueIamMemberMapOutput

type TagValueIamMemberMapOutput struct{ *pulumi.OutputState }

func (TagValueIamMemberMapOutput) ElementType

func (TagValueIamMemberMapOutput) ElementType() reflect.Type

func (TagValueIamMemberMapOutput) MapIndex

func (TagValueIamMemberMapOutput) ToOutput added in v6.65.1

func (TagValueIamMemberMapOutput) ToTagValueIamMemberMapOutput

func (o TagValueIamMemberMapOutput) ToTagValueIamMemberMapOutput() TagValueIamMemberMapOutput

func (TagValueIamMemberMapOutput) ToTagValueIamMemberMapOutputWithContext

func (o TagValueIamMemberMapOutput) ToTagValueIamMemberMapOutputWithContext(ctx context.Context) TagValueIamMemberMapOutput

type TagValueIamMemberOutput

type TagValueIamMemberOutput struct{ *pulumi.OutputState }

func (TagValueIamMemberOutput) Condition added in v6.23.0

func (TagValueIamMemberOutput) ElementType

func (TagValueIamMemberOutput) ElementType() reflect.Type

func (TagValueIamMemberOutput) Etag added in v6.23.0

(Computed) The etag of the IAM policy.

func (TagValueIamMemberOutput) Member added in v6.23.0

func (TagValueIamMemberOutput) Role added in v6.23.0

The role that should be applied. Only one `tags.TagValueIamBinding` can be used per role. Note that custom roles must be of the format `[projects|organizations]/{parent-name}/roles/{role-name}`.

func (TagValueIamMemberOutput) TagValue added in v6.23.0

Used to find the parent resource to bind the IAM policy to

  • `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values:
  • **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
  • **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
  • **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
  • **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
  • **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
  • **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
  • **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"

func (TagValueIamMemberOutput) ToOutput added in v6.65.1

func (TagValueIamMemberOutput) ToTagValueIamMemberOutput

func (o TagValueIamMemberOutput) ToTagValueIamMemberOutput() TagValueIamMemberOutput

func (TagValueIamMemberOutput) ToTagValueIamMemberOutputWithContext

func (o TagValueIamMemberOutput) ToTagValueIamMemberOutputWithContext(ctx context.Context) TagValueIamMemberOutput

type TagValueIamMemberState

type TagValueIamMemberState struct {
	Condition TagValueIamMemberConditionPtrInput
	// (Computed) The etag of the IAM policy.
	Etag   pulumi.StringPtrInput
	Member pulumi.StringPtrInput
	// The role that should be applied. Only one
	// `tags.TagValueIamBinding` can be used per role. Note that custom roles must be of the format
	// `[projects|organizations]/{parent-name}/roles/{role-name}`.
	Role pulumi.StringPtrInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagValue pulumi.StringPtrInput
}

func (TagValueIamMemberState) ElementType

func (TagValueIamMemberState) ElementType() reflect.Type

type TagValueIamPolicy

type TagValueIamPolicy struct {
	pulumi.CustomResourceState

	// (Computed) The etag of the IAM policy.
	Etag pulumi.StringOutput `pulumi:"etag"`
	// The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData pulumi.StringOutput `pulumi:"policyData"`
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagValue pulumi.StringOutput `pulumi:"tagValue"`
}

Three different resources help you manage your IAM policy for Tags TagValue. Each of these resources serves a different use case:

* `tags.TagValueIamPolicy`: Authoritative. Sets the IAM policy for the tagvalue and replaces any existing policy already attached. * `tags.TagValueIamBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the tagvalue are preserved. * `tags.TagValueIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the tagvalue are preserved.

A data source can be used to retrieve policy data in advent you do not need creation

* `tags.TagValueIamPolicy`: Retrieves the IAM policy for the tagvalue

> **Note:** `tags.TagValueIamPolicy` **cannot** be used in conjunction with `tags.TagValueIamBinding` and `tags.TagValueIamMember` or they will fight over what your policy should be.

> **Note:** `tags.TagValueIamBinding` resources **can be** used in conjunction with `tags.TagValueIamMember` resources **only if** they do not grant privilege to the same role.

## google\_tags\_tag\_value\_iam\_policy

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		admin, err := organizations.LookupIAMPolicy(ctx, &organizations.LookupIAMPolicyArgs{
			Bindings: []organizations.GetIAMPolicyBinding{
				{
					Role: "roles/viewer",
					Members: []string{
						"user:jane@example.com",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = tags.NewTagValueIamPolicy(ctx, "policy", &tags.TagValueIamPolicyArgs{
			TagValue:   pulumi.Any(google_tags_tag_value.Value.Name),
			PolicyData: *pulumi.String(admin.PolicyData),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_tags\_tag\_value\_iam\_binding

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagValueIamBinding(ctx, "binding", &tags.TagValueIamBindingArgs{
			TagValue: pulumi.Any(google_tags_tag_value.Value.Name),
			Role:     pulumi.String("roles/viewer"),
			Members: pulumi.StringArray{
				pulumi.String("user:jane@example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## google\_tags\_tag\_value\_iam\_member

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/tags"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tags.NewTagValueIamMember(ctx, "member", &tags.TagValueIamMemberArgs{
			TagValue: pulumi.Any(google_tags_tag_value.Value.Name),
			Role:     pulumi.String("roles/viewer"),
			Member:   pulumi.String("user:jane@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

For all import syntaxes, the "resource in question" can take any of the following forms* tagValues/{{name}} * {{name}} Any variables not passed in the import command will be taken from the provider configuration. Tags tagvalue IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.

```sh

$ pulumi import gcp:tags/tagValueIamPolicy:TagValueIamPolicy editor "tagValues/{{tag_value}} roles/viewer user:jane@example.com"

```

IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.

```sh

$ pulumi import gcp:tags/tagValueIamPolicy:TagValueIamPolicy editor "tagValues/{{tag_value}} roles/viewer"

```

IAM policy imports use the identifier of the resource in question, e.g.

```sh

$ pulumi import gcp:tags/tagValueIamPolicy:TagValueIamPolicy editor tagValues/{{tag_value}}

```

-> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the

full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.

func GetTagValueIamPolicy

func GetTagValueIamPolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TagValueIamPolicyState, opts ...pulumi.ResourceOption) (*TagValueIamPolicy, error)

GetTagValueIamPolicy gets an existing TagValueIamPolicy resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewTagValueIamPolicy

func NewTagValueIamPolicy(ctx *pulumi.Context,
	name string, args *TagValueIamPolicyArgs, opts ...pulumi.ResourceOption) (*TagValueIamPolicy, error)

NewTagValueIamPolicy registers a new resource with the given unique name, arguments, and options.

func (*TagValueIamPolicy) ElementType

func (*TagValueIamPolicy) ElementType() reflect.Type

func (*TagValueIamPolicy) ToOutput added in v6.65.1

func (*TagValueIamPolicy) ToTagValueIamPolicyOutput

func (i *TagValueIamPolicy) ToTagValueIamPolicyOutput() TagValueIamPolicyOutput

func (*TagValueIamPolicy) ToTagValueIamPolicyOutputWithContext

func (i *TagValueIamPolicy) ToTagValueIamPolicyOutputWithContext(ctx context.Context) TagValueIamPolicyOutput

type TagValueIamPolicyArgs

type TagValueIamPolicyArgs struct {
	// The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData pulumi.StringInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagValue pulumi.StringInput
}

The set of arguments for constructing a TagValueIamPolicy resource.

func (TagValueIamPolicyArgs) ElementType

func (TagValueIamPolicyArgs) ElementType() reflect.Type

type TagValueIamPolicyArray

type TagValueIamPolicyArray []TagValueIamPolicyInput

func (TagValueIamPolicyArray) ElementType

func (TagValueIamPolicyArray) ElementType() reflect.Type

func (TagValueIamPolicyArray) ToOutput added in v6.65.1

func (TagValueIamPolicyArray) ToTagValueIamPolicyArrayOutput

func (i TagValueIamPolicyArray) ToTagValueIamPolicyArrayOutput() TagValueIamPolicyArrayOutput

func (TagValueIamPolicyArray) ToTagValueIamPolicyArrayOutputWithContext

func (i TagValueIamPolicyArray) ToTagValueIamPolicyArrayOutputWithContext(ctx context.Context) TagValueIamPolicyArrayOutput

type TagValueIamPolicyArrayInput

type TagValueIamPolicyArrayInput interface {
	pulumi.Input

	ToTagValueIamPolicyArrayOutput() TagValueIamPolicyArrayOutput
	ToTagValueIamPolicyArrayOutputWithContext(context.Context) TagValueIamPolicyArrayOutput
}

TagValueIamPolicyArrayInput is an input type that accepts TagValueIamPolicyArray and TagValueIamPolicyArrayOutput values. You can construct a concrete instance of `TagValueIamPolicyArrayInput` via:

TagValueIamPolicyArray{ TagValueIamPolicyArgs{...} }

type TagValueIamPolicyArrayOutput

type TagValueIamPolicyArrayOutput struct{ *pulumi.OutputState }

func (TagValueIamPolicyArrayOutput) ElementType

func (TagValueIamPolicyArrayOutput) Index

func (TagValueIamPolicyArrayOutput) ToOutput added in v6.65.1

func (TagValueIamPolicyArrayOutput) ToTagValueIamPolicyArrayOutput

func (o TagValueIamPolicyArrayOutput) ToTagValueIamPolicyArrayOutput() TagValueIamPolicyArrayOutput

func (TagValueIamPolicyArrayOutput) ToTagValueIamPolicyArrayOutputWithContext

func (o TagValueIamPolicyArrayOutput) ToTagValueIamPolicyArrayOutputWithContext(ctx context.Context) TagValueIamPolicyArrayOutput

type TagValueIamPolicyInput

type TagValueIamPolicyInput interface {
	pulumi.Input

	ToTagValueIamPolicyOutput() TagValueIamPolicyOutput
	ToTagValueIamPolicyOutputWithContext(ctx context.Context) TagValueIamPolicyOutput
}

type TagValueIamPolicyMap

type TagValueIamPolicyMap map[string]TagValueIamPolicyInput

func (TagValueIamPolicyMap) ElementType

func (TagValueIamPolicyMap) ElementType() reflect.Type

func (TagValueIamPolicyMap) ToOutput added in v6.65.1

func (TagValueIamPolicyMap) ToTagValueIamPolicyMapOutput

func (i TagValueIamPolicyMap) ToTagValueIamPolicyMapOutput() TagValueIamPolicyMapOutput

func (TagValueIamPolicyMap) ToTagValueIamPolicyMapOutputWithContext

func (i TagValueIamPolicyMap) ToTagValueIamPolicyMapOutputWithContext(ctx context.Context) TagValueIamPolicyMapOutput

type TagValueIamPolicyMapInput

type TagValueIamPolicyMapInput interface {
	pulumi.Input

	ToTagValueIamPolicyMapOutput() TagValueIamPolicyMapOutput
	ToTagValueIamPolicyMapOutputWithContext(context.Context) TagValueIamPolicyMapOutput
}

TagValueIamPolicyMapInput is an input type that accepts TagValueIamPolicyMap and TagValueIamPolicyMapOutput values. You can construct a concrete instance of `TagValueIamPolicyMapInput` via:

TagValueIamPolicyMap{ "key": TagValueIamPolicyArgs{...} }

type TagValueIamPolicyMapOutput

type TagValueIamPolicyMapOutput struct{ *pulumi.OutputState }

func (TagValueIamPolicyMapOutput) ElementType

func (TagValueIamPolicyMapOutput) ElementType() reflect.Type

func (TagValueIamPolicyMapOutput) MapIndex

func (TagValueIamPolicyMapOutput) ToOutput added in v6.65.1

func (TagValueIamPolicyMapOutput) ToTagValueIamPolicyMapOutput

func (o TagValueIamPolicyMapOutput) ToTagValueIamPolicyMapOutput() TagValueIamPolicyMapOutput

func (TagValueIamPolicyMapOutput) ToTagValueIamPolicyMapOutputWithContext

func (o TagValueIamPolicyMapOutput) ToTagValueIamPolicyMapOutputWithContext(ctx context.Context) TagValueIamPolicyMapOutput

type TagValueIamPolicyOutput

type TagValueIamPolicyOutput struct{ *pulumi.OutputState }

func (TagValueIamPolicyOutput) ElementType

func (TagValueIamPolicyOutput) ElementType() reflect.Type

func (TagValueIamPolicyOutput) Etag added in v6.23.0

(Computed) The etag of the IAM policy.

func (TagValueIamPolicyOutput) PolicyData added in v6.23.0

The policy data generated by a `organizations.getIAMPolicy` data source.

func (TagValueIamPolicyOutput) TagValue added in v6.23.0

Used to find the parent resource to bind the IAM policy to

  • `member/members` - (Required) Identities that will be granted the privilege in `role`. Each entry can have one of the following values:
  • **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
  • **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
  • **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
  • **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
  • **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
  • **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
  • **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
  • **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
  • **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"

func (TagValueIamPolicyOutput) ToOutput added in v6.65.1

func (TagValueIamPolicyOutput) ToTagValueIamPolicyOutput

func (o TagValueIamPolicyOutput) ToTagValueIamPolicyOutput() TagValueIamPolicyOutput

func (TagValueIamPolicyOutput) ToTagValueIamPolicyOutputWithContext

func (o TagValueIamPolicyOutput) ToTagValueIamPolicyOutputWithContext(ctx context.Context) TagValueIamPolicyOutput

type TagValueIamPolicyState

type TagValueIamPolicyState struct {
	// (Computed) The etag of the IAM policy.
	Etag pulumi.StringPtrInput
	// The policy data generated by
	// a `organizations.getIAMPolicy` data source.
	PolicyData pulumi.StringPtrInput
	// Used to find the parent resource to bind the IAM policy to
	//
	// * `member/members` - (Required) Identities that will be granted the privilege in `role`.
	//   Each entry can have one of the following values:
	// * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account.
	// * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account.
	// * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
	// * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
	// * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com.
	// * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
	// * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project"
	// * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project"
	// * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project"
	TagValue pulumi.StringPtrInput
}

func (TagValueIamPolicyState) ElementType

func (TagValueIamPolicyState) ElementType() reflect.Type

type TagValueInput

type TagValueInput interface {
	pulumi.Input

	ToTagValueOutput() TagValueOutput
	ToTagValueOutputWithContext(ctx context.Context) TagValueOutput
}

type TagValueMap

type TagValueMap map[string]TagValueInput

func (TagValueMap) ElementType

func (TagValueMap) ElementType() reflect.Type

func (TagValueMap) ToOutput added in v6.65.1

func (i TagValueMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*TagValue]

func (TagValueMap) ToTagValueMapOutput

func (i TagValueMap) ToTagValueMapOutput() TagValueMapOutput

func (TagValueMap) ToTagValueMapOutputWithContext

func (i TagValueMap) ToTagValueMapOutputWithContext(ctx context.Context) TagValueMapOutput

type TagValueMapInput

type TagValueMapInput interface {
	pulumi.Input

	ToTagValueMapOutput() TagValueMapOutput
	ToTagValueMapOutputWithContext(context.Context) TagValueMapOutput
}

TagValueMapInput is an input type that accepts TagValueMap and TagValueMapOutput values. You can construct a concrete instance of `TagValueMapInput` via:

TagValueMap{ "key": TagValueArgs{...} }

type TagValueMapOutput

type TagValueMapOutput struct{ *pulumi.OutputState }

func (TagValueMapOutput) ElementType

func (TagValueMapOutput) ElementType() reflect.Type

func (TagValueMapOutput) MapIndex

func (TagValueMapOutput) ToOutput added in v6.65.1

func (TagValueMapOutput) ToTagValueMapOutput

func (o TagValueMapOutput) ToTagValueMapOutput() TagValueMapOutput

func (TagValueMapOutput) ToTagValueMapOutputWithContext

func (o TagValueMapOutput) ToTagValueMapOutputWithContext(ctx context.Context) TagValueMapOutput

type TagValueOutput

type TagValueOutput struct{ *pulumi.OutputState }

func (TagValueOutput) CreateTime added in v6.23.0

func (o TagValueOutput) CreateTime() pulumi.StringOutput

Output only. Creation time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

func (TagValueOutput) Description added in v6.23.0

func (o TagValueOutput) Description() pulumi.StringPtrOutput

User-assigned description of the TagValue. Must not exceed 256 characters.

func (TagValueOutput) ElementType

func (TagValueOutput) ElementType() reflect.Type

func (TagValueOutput) Name added in v6.23.0

The generated numeric id for the TagValue.

func (TagValueOutput) NamespacedName added in v6.23.0

func (o TagValueOutput) NamespacedName() pulumi.StringOutput

Output only. Namespaced name of the TagValue. Will be in the format {parentNamespace}/{tagKeyShortName}/{shortName}.

func (TagValueOutput) Parent added in v6.23.0

func (o TagValueOutput) Parent() pulumi.StringOutput

Input only. The resource name of the new TagValue's parent. Must be of the form tagKeys/{tag_key_id}.

func (TagValueOutput) ShortName added in v6.23.0

func (o TagValueOutput) ShortName() pulumi.StringOutput

Input only. User-assigned short name for TagValue. The short name should be unique for TagValues within the same parent TagKey. The short name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.

***

func (TagValueOutput) ToOutput added in v6.65.1

func (TagValueOutput) ToTagValueOutput

func (o TagValueOutput) ToTagValueOutput() TagValueOutput

func (TagValueOutput) ToTagValueOutputWithContext

func (o TagValueOutput) ToTagValueOutputWithContext(ctx context.Context) TagValueOutput

func (TagValueOutput) UpdateTime added in v6.23.0

func (o TagValueOutput) UpdateTime() pulumi.StringOutput

Output only. Update time. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

type TagValueState

type TagValueState struct {
	// Output only. Creation time.
	// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
	CreateTime pulumi.StringPtrInput
	// User-assigned description of the TagValue. Must not exceed 256 characters.
	Description pulumi.StringPtrInput
	// The generated numeric id for the TagValue.
	Name pulumi.StringPtrInput
	// Output only. Namespaced name of the TagValue. Will be in the format {parentNamespace}/{tagKeyShortName}/{shortName}.
	NamespacedName pulumi.StringPtrInput
	// Input only. The resource name of the new TagValue's parent. Must be of the form tagKeys/{tag_key_id}.
	Parent pulumi.StringPtrInput
	// Input only. User-assigned short name for TagValue. The short name should be unique for TagValues within the same parent TagKey.
	// The short name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
	//
	// ***
	ShortName pulumi.StringPtrInput
	// Output only. Update time.
	// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
	UpdateTime pulumi.StringPtrInput
}

func (TagValueState) ElementType

func (TagValueState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL