Below is the task
- name: create rxgt-ps-b2b-app-vpc-endpoints changeset
cloudformation_execute_changeset:
stack_name: "rxgt-ps-b2b-app-vpc-endpoints"
state: present
region: "{{
stack_output_result.net_stack_output_result.account_config.1 }}"
aws_access_key: "{{
stack_output_result.net_stack_output_result.account_config.0.sts_creds.access_key
}}"
aws_secret_key: "{{
stack_output_result.net_stack_output_result.account_config.0.sts_creds.secret_key
}}"
security_token: "{{
stack_output_result.net_stack_output_result.account_config.0.sts_creds.session_token
}}"
create_changeset: true
execute_changeset: "{{ with_stack_deploy }}"
changeset_name: "{{ cf_changeset_name }}"
template_body: "{{ lookup('template',
'rxgt-ps-b2b-app-vpc-endpoints.yaml.j2') }}"
template_parameters:
VPC: "{{
stack_output_result.net_stack_output_result.ansible_facts.cloudformation['rxgt-ps-b2b-app-vpc'].stack_outputs['VPC']
}}"
RouteTables: "{{
(stack_output_result.ansible_facts.cloudformation['rxgt-ps-b2b-app-networks'].stack_outputs['PublicRouteTable'],
stack_output_result.ansible_facts.cloudformation['rxgt-ps-b2b-app-networks'].stack_outputs['PrivatePreprodPrivateRouteTable'],
stack_output_result.ansible_facts.cloudformation['rxgt-ps-b2b-app-networks'].stack_outputs['PrivateProdPrivateRouteTable'])
| join(',') }}"
PublicSubnets: "{{
stack_output_result.net_stack_output_result.ansible_facts.cloudformation['rxgt-ps-b2b-app-vpc'].stack_outputs['PublicSubnets']
}}"
SecurityGroupIds: "{{
stack_output_result.net_stack_output_result.account_config.0.account_config.vpcs[stack_output_result.net_stack_output_result.account_config.1].app.vpc_endpoints.security_group_ids|join(',')
}}"
termination_protection: no
tags: "{{ global_tags |
combine(stack_output_result.net_stack_output_result.account_config.0.account_config.stacks['rxgt-ps-b2b-app-vpc-endpoints'].override_tags,
recursive=True) }}"
loop: "{{ b2b_app_networks_stack_outputs.results }}"
loop_control:
loop_var: stack_output_result
label: "{{
stack_output_result.net_stack_output_result.account_config.1 }}"
register: stack_changeset_results
tags:
- rxgt-ps-b2b-vpc-stack-deploy
- rxgt-ps-b2b-securitygroups
On Tuesday, 15 June 2021 at 13:59:23 UTC+1 [email protected] wrote:
> Can you provide snapshot of what your task looks like?
>
> On Tue, Jun 15, 2021, 6:22 PM [email protected] <[email protected]> wrote:
>
>> Hi All,
>>
>> I am trying to re-create the AWS Core infrastructure using ansible in
>> another region. I am getting the following error
>>
>> The task includes an option with an undefined variable. The error was:
>> 'dict object' has no attribute 'vpc_endpoints'\n\nThe error appears to be
>> in
>> '/home/ec2-user/environment/aws-rxgt-b2b-platform/ansible/rxgt-ps-rxgtb2b-playbook.yaml':
>>
>> line 646, column 7, but may\nbe elsewhere in the file depending on the
>> exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name:
>> create rxgt-ps-b2b-app-vpc-endpoints changeset\n ^ here\n"}
>>
>> I tried to debug this by creating a debug statement before this task and
>> it prints out everything. But running this task gives the above error
>> message.
>>
>> Could someone please help me identify the problem?
>>
>> Thanks
>> Kishore
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/89c20198-3888-4e74-afcb-a52e76524c19n%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/ansible-project/89c20198-3888-4e74-afcb-a52e76524c19n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/8425493e-eaaa-4fcb-a833-5b348512ffdcn%40googlegroups.com.