AWS
Account
AWS Account
resource "aws_account" "name" {
...
}
Attributes
required type: ResourceBase
Regions regions
type: []string
The regions infrastructure can be provisioned into.
regions = ["us-east-1", "us-east-2"]
Services services
type: []string
The services to allow access to.
services = ["ec2", "cloudfront"]
Tags tags
type: map[string]string
Tags to add to the account.
tags = {
key = "value"
}
Users user
type: []block
User
Users that will be created within the account.
user "admin" {
iam_policy = file("./files/policy.json")
managed_policies = [
"arn:aws:iam::aws:policy/AmazonSQSFullAccess",
"arn:aws:iam::aws:policy/AmazonEC2FullAccess"
]
}
SCPPolicy scp_policy
type: string
The SCP policy to apply to the account.
scp_policy = file("./files/scp.json")
AccountID account_id
type: string
Output parameters
AccountName account_name
type: string
Computed Attributes
These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.
Meta ID meta.id
string
The full ID of the resource e.g. resource.type.name
.
This is computed from the full resource path:
// given the following resource
resource "container" "ubuntu" {
...
}
// the resulting id will be
resource.container.ubuntu
Meta Type meta.type
string
The type of the resource. This taken from the type label of the resource definition.
// given the following resource
resource "container" "ubuntu" {
...
}
// the resulting type will be
container
Meta Name meta.name
string
The name of the resource. This taken from the name label of the resource definition.
// given the following resource
resource "container" "ubuntu" {
...
}
// the resulting name will be
ubuntu
User
User
resource "aws_account" "name" {
user "name" {
...
}
}
Attributes
Name name
required
type: string
The username of the user.
user "username" {
...
}
IAMPolicy iam_policy
type: string
The IAM policy to apply to the user.
iam_policy = file("./files/policy.json")
ManagedPolicies managed_policies
type: []string
The managed policies to apply to the user.
managed_policies = [
"arn:aws:iam::aws:policy/AmazonSQSFullAccess",
"arn:aws:iam::aws:policy/AmazonEC2FullAccess"
]
Username username
type: string
Output parameters
Password password
type: string
AccessKey access_key
type: AccessKey
Computed Attributes
These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.
Last updated