The `terraform` directory contains the resource descriptions for all AWS services that need to be configured in order for the dynamic K8s provisioner to work. Specifically, it defines the EventBridge rule and SNS topic/subscriptions that instruct AWS to send EC2 instance state change notifications to the *dynk8s-provisioner*'s HTTP interface. |
||
---|---|---|
.. | ||
.gitattributes | ||
.gitignore | ||
.terraform.lock.hcl | ||
README.md | ||
eventbridge.tf | ||
iam-policy.json | ||
main.tf | ||
sns.tf | ||
terraform.tfstate | ||
variables.tf |
README.md
Configuring AWS Using Terraform
Prerequisites
The IAM user or role that runs Terraform must have the appropriate permissions.
The iam-policy.json
file defines a policy that will allow the Terraform to
manage all of the necessary resources. Before running Terraform, create an IAM
policy and assign it to a user, group, or role. Be sure to replace the AWS
account ID in the various target resource names.
To use an IAM role, set the iam_role
Terraform variable when executing
terraform plan
/terraform apply
.
Create Resources
Terraform will create all resources automatically:
terraform apply