style: renaming scheme for config files
This commit is contained in:
@@ -13,7 +13,7 @@ tasks:
|
||||
enter:
|
||||
cmd: aws ssm start-session --target $INSTANCE_ID
|
||||
env:
|
||||
INSTANCE_ID: { sh: jq -r .instance_id.value < config/infrastructure.secret.tf.json }
|
||||
INSTANCE_ID: { sh: jq -r .instance_id.value < config/infrastructure.secret.json }
|
||||
AWS_REGION: { sh: jq -r .aws_region < config/ansible.secret.json }
|
||||
AWS_ACCESS_KEY_ID: { sh: jq -r .aws_access_key < config/ansible.secret.json }
|
||||
AWS_SECRET_ACCESS_KEY: { sh: jq -r .aws_secret_key < config/ansible.secret.json }
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
hosts: localhost
|
||||
vars_files:
|
||||
- ../config/ansible.secret.json
|
||||
- ../config/infrastructure.secret.tf.json
|
||||
- ../config/infrastructure.secret.json
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Log into Docker.
|
||||
@@ -34,7 +34,7 @@
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
- ../config/ansible.secret.json
|
||||
- ../config/infrastructure.secret.tf.json
|
||||
- ../config/infrastructure.secret.json
|
||||
vars:
|
||||
ansible_connection: aws_ssm
|
||||
ansible_aws_ssm_plugin: "{{ ssm_plugin }}"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
- ../config/ansible.secret.json
|
||||
- ../config/infrastructure.secret.tf.json
|
||||
- ../config/infrastructure.secret.json
|
||||
vars:
|
||||
ansible_connection: aws_ssm
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
gather_facts: false
|
||||
vars_files:
|
||||
- ../config/ansible.secret.json
|
||||
- ../config/infrastructure.secret.tf.json
|
||||
- ../config/infrastructure.secret.json
|
||||
vars:
|
||||
ansible_connection: aws_ssm
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
|
||||
@@ -2,9 +2,9 @@ version: 3
|
||||
silent: true
|
||||
|
||||
vars:
|
||||
BACKEND: ../config/backend.secret.tf.json
|
||||
VARIABLES: ../config/variables.secret.tf.json
|
||||
OUTPUT: ../config/infrastructure.secret.tf.json
|
||||
BACKEND: ../config/backend.secret.json
|
||||
VARIABLES: ../config/variables.secret.json
|
||||
OUTPUT: ../config/infrastructure.secret.json
|
||||
|
||||
tasks:
|
||||
init: terraform init -backend-config={{.BACKEND}}
|
||||
|
||||
@@ -4,8 +4,10 @@ resource "aws_eip" "public" {
|
||||
domain = "vpc"
|
||||
}
|
||||
|
||||
data "aws_iam_instance_profile" "ssm" {
|
||||
# An instance profile for access via AWS SSM.
|
||||
resource "aws_iam_instance_profile" "ssm" {
|
||||
name = "SSMInstanceProfile"
|
||||
role = "AmazonSSMRoleForInstancesQuickSetup"
|
||||
}
|
||||
|
||||
# The Gitea instance.
|
||||
@@ -18,7 +20,7 @@ resource "aws_instance" "this" {
|
||||
user_data = file("install.sh")
|
||||
user_data_replace_on_change = false
|
||||
|
||||
iam_instance_profile = data.aws_iam_instance_profile.ssm.name
|
||||
iam_instance_profile = aws_iam_instance_profile.ssm.name
|
||||
vpc_security_group_ids = [aws_security_group.public_access.id]
|
||||
|
||||
metadata_options {
|
||||
|
||||
Reference in New Issue
Block a user