Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing variable names for AWSAFTExection #459

Open
hacker65536 opened this issue May 21, 2024 · 3 comments
Open

Confusing variable names for AWSAFTExection #459

hacker65536 opened this issue May 21, 2024 · 3 comments
Labels
bug Something isn't working pending investigation Issue needs further investigation

Comments

@hacker65536
Copy link

Terraform Version & Prov:

AFT Version:
1.12.2

Terraform Version & Provider Versions
Please provide the outputs of terraform version and terraform providers from within your AFT environment

terraform version

{Replace me}

terraform providers

{Replace me}

Bug Description

I think aft_admin_role_arn should be aft_exec_role_arn.

$ aws ssm get-parameters-by-path --path "/aft/resources/iam/" --query 'Parameters[*].Name.[@]' --output text
/aft/resources/iam/aft-administrator-role-name
/aft/resources/iam/aft-execution-role-name
/aft/resources/iam/aft-session-name
$ git grep --name-only "aft_admin_role_arn"
examples/multiple-account-customizations/account-customization-dev/terraform/backend.jinja
examples/multiple-account-customizations/account-customization-prod/terraform/backend.jinja
examples/multiple-regions-customization/multiple-regions/terraform/backend.jinja
modules/aft-code-repositories/buildspecs/ct-aft-account-provisioning-customizations.yml
modules/aft-code-repositories/buildspecs/ct-aft-account-request.yml
modules/aft-customizations/buildspecs/aft-account-customizations-terraform.yml
modules/aft-customizations/buildspecs/aft-global-customizations-terraform.yml
modules/aft-iam-roles/outputs.tf
sources/aft-customizations-repos/aft-account-customizations/ACCOUNT_TEMPLATE/terraform/backend.jinja
sources/aft-customizations-repos/aft-account-provisioning-customizations/terraform/aft-providers.jinja
sources/aft-customizations-repos/aft-account-provisioning-customizations/terraform/backend.jinja
sources/aft-customizations-repos/aft-account-request/terraform/aft-providers.jinja
sources/aft-customizations-repos/aft-account-request/terraform/backend.jinja
sources/aft-customizations-repos/aft-global-customizations/terraform/backend.jinja

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Related Logs
Provide any related logs or error messages to help explain your problem.

Additional context
Add any other context about the problem here.

@hacker65536 hacker65536 added bug Something isn't working pending investigation Issue needs further investigation labels May 21, 2024
@snebhu3
Copy link
Collaborator

snebhu3 commented Jun 21, 2024

@hacker65536 thank you for reaching out.
Please may you elaborate on why you would require this change of variable names?
You could read more on AFT required roles here.

@hacker65536
Copy link
Author

hacker65536 commented Jun 26, 2024

@snebhu3

Sorry I am not explaining it well.
This is about buildspec.yaml and jinja template.

I think the variable name aft_admin_role_arn should be aft_exec_role_arn because the actual content of the variable name aft_admin_role_arn is arn:aws:iam::*:role/AWSAFTExecution.

@hacker65536
Copy link
Author

e.g.

for f in *.jinja; do jinja2 $f -D timestamp="$TIMESTAMP" -D provider_region=$CT_MGMT_REGION -D tf_distribution_type=$TF_DISTRIBUTION -D terraform_org_name=$TF_ORG_NAME -D terraform_workspace_name=$TF_WORKSPACE_NAME -D aft_admin_role_arn=$AFT_EXEC_ROLE_ARN >> ./$(basename $f .jinja).tf; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending investigation Issue needs further investigation
Projects
None yet
Development

No branches or pull requests

2 participants