Understanding the AWS Provider for Terraform

Reading material and code examples

Table of Contents

Reading material

This section is a collection of links that will help you make the most of today's session.

HashiCorp Configuration Language

Terraform Basics

Docker Provider for Terraform

AWS Provider for Terraform

Code Quality

Before plan and apply, always clean up your code:

Importing resources

Create a resource in your Terraform code:

resource "aws_s3_bucket" "hug_demo" {
  bucket = "hug-demo"
}

Then run the terraform import command:

terraform import \
    aws_s3_bucket.hug_demo "hug-demo"

specify the Terraform-native resource (aws_s3_bucket.hug_demo) as well as the provider resource (hug-demo)

  • use Terraformer for importing large sets of resources

Author Information

This repository is maintained by Kerim Satirli.

License

Licensed under the Apache License, Version 2.0 (the "License").

You may obtain a copy of the License at apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" basis, without WARRANTIES or conditions of any kind, either express or implied.

See the License for the specific language governing permissions and limitations under the License.