Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
terraform-aws-ec2-instance
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Terraform Modules
terraform-aws-ec2-instance
Commits
75effc3f
Unverified
Commit
75effc3f
authored
Aug 26, 2021
by
Bryant Biggs
Committed by
GitHub
Aug 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update `README.md` example for making an encrypted AMI (#235)
parent
e80ac14a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
16 deletions
+22
-16
README.md
README.md
+22
-16
No files found.
README.md
View file @
75effc3f
...
...
@@ -64,38 +64,44 @@ This module does not support encrypted AMI's out of the box however it is easy e
This example creates an encrypted image from the latest ubuntu 16.04 base image.
```
hcl
resource
"aws_ami_copy"
"ubuntu-xenial-encrypted-ami"
{
name
=
"ubuntu-xenial-encrypted-ami"
description
=
"An encrypted root ami based off ${data.aws_ami.ubuntu-xenial.id}"
source_ami_id
=
"${data.aws_ami.ubuntu-xenial.id}"
source_ami_region
=
"eu-west-2"
encrypted
=
"true"
tags
{
Name
=
"ubuntu-xenial-encrypted-ami"
}
provider
"aws"
{
region
=
"us-west-2"
}
data
"aws_ami"
"
encrypted-ami
"
{
data
"aws_ami"
"
ubuntu
"
{
most_recent
=
true
owners
=
[
"679593333241"
]
filter
{
name
=
"name"
values
=
[
"ubuntu-
xenial-encrypted
"
]
values
=
[
"ubuntu-
minimal/images/hvm-ssd/ubuntu-focal-20.04-*
"
]
}
owners
=
[
"self"
]
filter
{
name
=
"virtualization-type"
values
=
[
"hvm"
]
}
}
data
"aws_ami"
"ubuntu-xenial"
{
resource
"aws_ami_copy"
"ubuntu_encrypted_ami"
{
name
=
"ubuntu-encrypted-ami"
description
=
"An encrypted root ami based off ${data.aws_ami.ubuntu.id}"
source_ami_id
=
data
.
aws_ami
.
ubuntu
.
id
source_ami_region
=
"eu-west-2"
encrypted
=
true
tags
=
{
Name
=
"ubuntu-encrypted-ami"
}
}
data
"aws_ami"
"encrypted-ami"
{
most_recent
=
true
filter
{
name
=
"name"
values
=
[
"ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*"
]
values
=
[
aws_ami_copy
.
ubuntu_encrypted_ami
.
id
]
}
owners
=
[
"099720109477
"
]
owners
=
[
"self
"
]
}
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment