This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "aws_flow_log" "example" { | |
| iam_role_arn = "${aws_iam_role.example.arn}" | |
| log_destination = "${aws_cloudwatch_log_group.example.arn}" | |
| traffic_type = "ALL" | |
| vpc_id = "${var.vpc_id}" | |
| } | |
| resource "aws_cloudwatch_log_group" "example" { | |
| name = "example" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ packer build firsttemplate.packer | |
| docker output will be in this color. | |
| ==> docker: Creating a temporary directory for sharing data... | |
| ==> docker: Pulling Docker image: centos:latest | |
| docker: latest: Pulling from library/centos | |
| docker: a02a4930cb5d: Pulling fs layer | |
| docker: a02a4930cb5d: Verifying Checksum | |
| docker: a02a4930cb5d: Download complete | |
| docker: a02a4930cb5d: Pull complete |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "builders": [{ | |
| "type": "docker", | |
| "image": "centos:latest", | |
| "export_path": "mytest.tar" | |
| }] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "builders": [{ | |
| "type": "amazon-ebs", | |
| "region": "us-west-2", | |
| "source_ami": "ami-01ed306a12b7d1c96", | |
| "instance_type": "t2.micro", | |
| "ssh_username": "centos", | |
| "ami_name": "centos-packer-example-1.0" | |
| }], | |
| "provisioners": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "builders": [{ | |
| "type": "amazon-ebs", | |
| "region": "us-west-2", | |
| "source_ami": "ami-01ed306a12b7d1c96", | |
| "instance_type": "t2.micro", | |
| "ssh_username": "centos", | |
| "ami_name": "centos-packer-example-4.0" | |
| }], | |
| "provisioners": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ packer build firsttemplate.packer | |
| amazon-ebs output will be in this color. | |
| ==> amazon-ebs: Prevalidating AMI Name: centos-packer-example-3.0 | |
| amazon-ebs: Found Image ID: ami-01ed306a12b7d1c96 | |
| ==> amazon-ebs: Creating temporary keypair: packer_5c8410e6-4a8a-670b-58dc-f3cfc390182d | |
| ==> amazon-ebs: Creating temporary security group for this instance: packer_5c8410e7-cf4c-4862-14b0-170b03c0cfcf | |
| ==> amazon-ebs: Authorizing access to port 22 from 0.0.0.0/0 in the temporary security group... | |
| ==> amazon-ebs: Launching a source AWS instance... | |
| ==> amazon-ebs: Adding tags to source instance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "builders": [{ | |
| "type": "amazon-ebs", | |
| "region": "us-west-2", | |
| "source_ami": "ami-01ed306a12b7d1c96", | |
| "instance_type": "t2.micro", | |
| "ssh_username": "centos", | |
| "ami_name": "centos-packer-example-3.0" | |
| }], | |
| "provisioners": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| provider "aws" { | |
| region = "us-west-2" | |
| } | |
| resource "aws_s3_bucket" "bucket" { | |
| bucket = "terraform-20181219040316452900000001" | |
| acl = "private" | |
| lifecycle_rule { | |
| enabled = true | |
| transition { | |
| days = 30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| provider "aws" { | |
| region = "us-west-2" | |
| } | |
| resource "aws_s3_bucket" "example" { | |
| bucket = "my-test-s3-terraform-bucket" | |
| acl = "private" | |
| versioning { | |
| enabled = true | |
| } | |
| tags { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| provider "aws" { | |
| region = "us-west-2" | |
| } | |
| resource "aws_s3_bucket" "mybucket" { | |
| bucket = "mys3bucket-withkms-serverside-encryption" | |
| server_side_encryption_configuration { | |
| rule { | |
| apply_server_side_encryption_by_default { | |
| kms_master_key_id = "${var.kms_key}" |