Class AccountIamPolicy
Allows management of the entire IAM policy for an existing Google Cloud Platform Billing Account.
Warning: Billing accounts have a default user that can be overwritten by use of this resource. The safest alternative is to use multiple
gcp.billing.AccountIamBindingresources. If you do use this resource, the best way to be sure that you are not making dangerous changes is to start by importing your existing policy, and examining the diff very closely.
Note: This resource must not be used in conjunction with
gcp.billing.AccountIamMemberorgcp.billing.AccountIamBindingor they will fight over what your policy should be.
Example Usage
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var admin = Output.Create(Gcp.Organizations.GetIAMPolicy.InvokeAsync(new Gcp.Organizations.GetIAMPolicyArgs
{
Binding =
{
{
{ "role", "roles/billing.viewer" },
{ "members",
{
"user:jane@example.com",
} },
},
},
}));
var policy = new Gcp.Billing.AccountIamPolicy("policy", new Gcp.Billing.AccountIamPolicyArgs
{
BillingAccountId = "00AA00-000AAA-00AA0A",
PolicyData = admin.Apply(admin => admin.PolicyData),
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Billing
Assembly: Pulumi.Gcp.dll
Syntax
public class AccountIamPolicy : CustomResource
Constructors
View SourceAccountIamPolicy(String, AccountIamPolicyArgs, CustomResourceOptions)
Create a AccountIamPolicy resource with the given unique name, arguments, and options.
Declaration
public AccountIamPolicy(string name, AccountIamPolicyArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AccountIamPolicyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceBillingAccountId
The billing account id.
Declaration
public Output<string> BillingAccountId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Etag
Declaration
public Output<string> Etag { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PolicyData
The gcp.organizations.getIAMPolicy data source that represents
the IAM policy that will be applied to the billing account. This policy overrides any existing
policy applied to the billing account.
Declaration
public Output<string> PolicyData { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, AccountIamPolicyState, CustomResourceOptions)
Get an existing AccountIamPolicy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AccountIamPolicy Get(string name, Input<string> id, AccountIamPolicyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AccountIamPolicyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AccountIamPolicy |