Resource: awsCloud9EnvironmentMembership
Provides an environment member to an AWS Cloud9 development environment.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsCloud9EnvironmentEc2Test =
new aws.cloud9EnvironmentEc2.Cloud9EnvironmentEc2(this, "test", {
instanceType: "t2.micro",
name: "some-env",
});
const awsIamUserTest = new aws.iamUser.IamUser(this, "test_1", {
name: "some-user",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsIamUserTest.overrideLogicalId("test");
const awsCloud9EnvironmentMembershipTest =
new aws.cloud9EnvironmentMembership.Cloud9EnvironmentMembership(
this,
"test_2",
{
environmentId: awsCloud9EnvironmentEc2Test.id,
permissions: "read-only",
userArn: awsIamUserTest.arn,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsCloud9EnvironmentMembershipTest.overrideLogicalId("test");
Argument Reference
The following arguments are supported:
environmentId
- (Required) The ID of the environment that contains the environment member you want to add.permissions
- (Required) The type of environment member permissions you want to associate with this environment member. Allowed values arereadOnly
andreadWrite
.userArn
- (Required) The Amazon Resource Name (ARN) of the environment member you want to add.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The ID of the environment membership.userId
- he user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
Import
Cloud9 environment membership can be imported using the environmentId#userArn
, e.g.