Infrastructure as Code for Beginners by Russ McKendrick

Infrastructure as Code for Beginners by Russ McKendrick

Author:Russ McKendrick
Language: eng
Format: epub
Publisher: Packt Publishing Pvt Ltd
Published: 2023-05-16T00:00:00+00:00


The AWS Storage role

This is a simple role that contains a single task:

- name: Create the EFS resource community.aws.efs: name: "{{ efs_name }}" state: present region: "{{ region }}" targets: - subnet_id: "{{ subnet_web01.subnet.id }}" security_groups: ["{{ security_group_efs.group_id }}"] - subnet_id: "{{ subnet_web02.subnet.id }}" security_groups: ["{{ security_group_efs.group_id }}"] tags: Name: "{{ efs_name }}" Description: "{{ dict.ansible_warning }}" Project: "{{ app.name }}" Environment: "{{ app.env }}" Deployed_by: "Ansible" register: efs

As you can see, it uses the community.aws.efs module to create the Amazon EFS share, creating a target endpoint in our two web subnets. This step is important as EFS has a different DNS endpoint in each availability zone, so without this, we would be unable to connect to the NFS share in both of our web subnets.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.