Google Cloud Classic v8.8.0 published on Thursday, Nov 7, 2024 by Pulumi
gcp.binaryauthorization.getAttestorIamPolicy
Explore with Pulumi AI
Retrieves the current IAM policy data for attestor
example
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const policy = gcp.binaryauthorization.getAttestorIamPolicy({
project: attestor.project,
attestor: attestor.name,
});
import pulumi
import pulumi_gcp as gcp
policy = gcp.binaryauthorization.get_attestor_iam_policy(project=attestor["project"],
attestor=attestor["name"])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/binaryauthorization"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := binaryauthorization.LookupAttestorIamPolicy(ctx, &binaryauthorization.LookupAttestorIamPolicyArgs{
Project: pulumi.StringRef(attestor.Project),
Attestor: attestor.Name,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var policy = Gcp.BinaryAuthorization.GetAttestorIamPolicy.Invoke(new()
{
Project = attestor.Project,
Attestor = attestor.Name,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.binaryauthorization.BinaryauthorizationFunctions;
import com.pulumi.gcp.binaryauthorization.inputs.GetAttestorIamPolicyArgs;
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 = BinaryauthorizationFunctions.getAttestorIamPolicy(GetAttestorIamPolicyArgs.builder()
.project(attestor.project())
.attestor(attestor.name())
.build());
}
}
variables:
policy:
fn::invoke:
Function: gcp:binaryauthorization:getAttestorIamPolicy
Arguments:
project: ${attestor.project}
attestor: ${attestor.name}
Using getAttestorIamPolicy
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAttestorIamPolicy(args: GetAttestorIamPolicyArgs, opts?: InvokeOptions): Promise<GetAttestorIamPolicyResult>
function getAttestorIamPolicyOutput(args: GetAttestorIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetAttestorIamPolicyResult>
def get_attestor_iam_policy(attestor: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAttestorIamPolicyResult
def get_attestor_iam_policy_output(attestor: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAttestorIamPolicyResult]
func LookupAttestorIamPolicy(ctx *Context, args *LookupAttestorIamPolicyArgs, opts ...InvokeOption) (*LookupAttestorIamPolicyResult, error)
func LookupAttestorIamPolicyOutput(ctx *Context, args *LookupAttestorIamPolicyOutputArgs, opts ...InvokeOption) LookupAttestorIamPolicyResultOutput
> Note: This function is named LookupAttestorIamPolicy
in the Go SDK.
public static class GetAttestorIamPolicy
{
public static Task<GetAttestorIamPolicyResult> InvokeAsync(GetAttestorIamPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetAttestorIamPolicyResult> Invoke(GetAttestorIamPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAttestorIamPolicyResult> getAttestorIamPolicy(GetAttestorIamPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gcp:binaryauthorization/getAttestorIamPolicy:getAttestorIamPolicy
arguments:
# arguments dictionary
The following arguments are supported:
- Attestor string
- Used to find the parent resource to bind the IAM policy to
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
- Attestor string
- Used to find the parent resource to bind the IAM policy to
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
- attestor String
- Used to find the parent resource to bind the IAM policy to
- project String
- The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
- attestor string
- Used to find the parent resource to bind the IAM policy to
- project string
- The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
- attestor str
- Used to find the parent resource to bind the IAM policy to
- project str
- 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.
- attestor String
- Used to find the parent resource to bind the IAM policy to
- project String
- The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
getAttestorIamPolicy Result
The following output properties are available:
- Attestor string
- Etag string
- (Computed) The etag of the IAM policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Policy
Data string - (Required only by
gcp.binaryauthorization.AttestorIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - Project string
- Attestor string
- Etag string
- (Computed) The etag of the IAM policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Policy
Data string - (Required only by
gcp.binaryauthorization.AttestorIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - Project string
- attestor String
- etag String
- (Computed) The etag of the IAM policy.
- id String
- The provider-assigned unique ID for this managed resource.
- policy
Data String - (Required only by
gcp.binaryauthorization.AttestorIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - project String
- attestor string
- etag string
- (Computed) The etag of the IAM policy.
- id string
- The provider-assigned unique ID for this managed resource.
- policy
Data string - (Required only by
gcp.binaryauthorization.AttestorIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - project string
- attestor str
- etag str
- (Computed) The etag of the IAM policy.
- id str
- The provider-assigned unique ID for this managed resource.
- policy_
data str - (Required only by
gcp.binaryauthorization.AttestorIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - project str
- attestor String
- etag String
- (Computed) The etag of the IAM policy.
- id String
- The provider-assigned unique ID for this managed resource.
- policy
Data String - (Required only by
gcp.binaryauthorization.AttestorIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - project String
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.