get Repository Iam Policy
Retrieves the current IAM policy data for repository
example
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const policy = gcp.securesourcemanager.getRepositoryIamPolicy({
project: _default.project,
location: _default.location,
repositoryId: _default.repositoryId,
});
import pulumi
import pulumi_gcp as gcp
policy = gcp.securesourcemanager.get_repository_iam_policy(project=default["project"],
location=default["location"],
repository_id=default["repositoryId"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var policy = Gcp.SecureSourceManager.GetRepositoryIamPolicy.Invoke(new()
{
Project = @default.Project,
Location = @default.Location,
RepositoryId = @default.RepositoryId,
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/securesourcemanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := securesourcemanager.LookupRepositoryIamPolicy(ctx, &securesourcemanager.LookupRepositoryIamPolicyArgs{
Project: pulumi.StringRef(_default.Project),
Location: pulumi.StringRef(_default.Location),
RepositoryId: _default.RepositoryId,
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.securesourcemanager.SecuresourcemanagerFunctions;
import com.pulumi.gcp.securesourcemanager.inputs.GetRepositoryIamPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var policy = SecuresourcemanagerFunctions.getRepositoryIamPolicy(GetRepositoryIamPolicyArgs.builder()
.project(default_.project())
.location(default_.location())
.repositoryId(default_.repositoryId())
.build());
}
}
variables:
policy:
fn::invoke:
Function: gcp:securesourcemanager:getRepositoryIamPolicy
Arguments:
project: ${default.project}
location: ${default.location}
repositoryId: ${default.repositoryId}
Return
A collection of values returned by getRepositoryIamPolicy.
Parameters
A collection of arguments for invoking getRepositoryIamPolicy.
Return
A collection of values returned by getRepositoryIamPolicy.
Parameters
The location for the Repository. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no location is specified, it is taken from the provider configuration.
The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
The ID for the Repository. Used to find the parent resource to bind the IAM policy to
See also
Return
A collection of values returned by getRepositoryIamPolicy.
Parameters
Builder for com.pulumi.gcp.securesourcemanager.kotlin.inputs.GetRepositoryIamPolicyPlainArgs.