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