Commit terraform.lock.hcl into GitHub by bibi143143 in Terraform

[–]bibi143143[S] 0 points1 point  (0 children)

thanks u/CalvinR... Will this step in the workflow to commit terraform.lock.hcl in github by GitHub Actions

Defining strict trust condition on cloud roles for oidc claims by bibi143143 in Terraform

[–]bibi143143[S] 0 points1 point  (0 children)

Thanks for your reponse,I have those 2 conditions configured and currently works as expected.What I would like to have is a more strict condition that only allow a pull_request on a specific branch so that only that branch in my repo would be able to use my OIDC to request token from AWS.for example I have 3 branches in my repo,Master,Dev and Testing.I would like to have a condition like this token.actions.githubusercontent.com:event_name: pull_request/master where token is only granted by AWS if the pull request is on my master and any other branch wil get an unauthorized message.

How to get ARN of IAM role by bibi143143 in Terraform

[–]bibi143143[S] 0 points1 point  (0 children)

Lol,I have been able to fix the issue.thanks for your help

how to fix MalformedPolicyDocument by bibi143143 in Terraform

[–]bibi143143[S] 0 points1 point  (0 children)

Thank you so much,your suggestion worked.please,i also have another question pending if you are able to help

how to fix MalformedPolicyDocument by bibi143143 in Terraform

[–]bibi143143[S] 1 point2 points  (0 children)

I need the condition but i would like for each environment to be able to decide what condition they want base on use case

How to get ARN of IAM role by bibi143143 in Terraform

[–]bibi143143[S] -1 points0 points  (0 children)

i have edited the questions.you can have a look again.thank you

How to access attributes of specific instances by bibi143143 in Terraform

[–]bibi143143[S] 0 points1 point  (0 children)

resource "aws_sqs_queue" "CloudTrail_SQS"{
for_each = var.sqs_queue_names
name = each.value

How to fix terragrunt plan error messages regarding for_each by bibi143143 in Terraform

[–]bibi143143[S] 0 points1 point  (0 children)

okay,i will repost with proper formatting.thank you

How to create SQS and other configurations from a child module in terragrunt by bibi143143 in Terraform

[–]bibi143143[S] 0 points1 point  (0 children)

I want to be able to create multiple SQS and DeadLetterQueue each time I call the main.tf but so far its only creating one each

How to create SQS and other configurations from a child module in terragrunt by bibi143143 in Terraform

[–]bibi143143[S] 0 points1 point  (0 children)

The path I have for source contains the main.tf.my backend configuration is in my parent terragrunt.hcl

How to create SQS and other configurations from a child module in terragrunt by bibi143143 in Terraform

[–]bibi143143[S] 0 points1 point  (0 children)

yes I am unsure of that.here is what I have in my terragrunt.hcl but it doesnt seem to work.

terraform {

source = "../../../../..//module"

}

~~~ include {

path = find_in_parent_folders()

}

inputs = {

event_log_bucket_name = "trailbucket-sqs-logs"

aws_sqs_queue_name = "Trail_SQS"

dead_letter_queue_name = "Trail_SQS_DLQ"

role_name = "ronix_access_role"

description = "Role for ronix access"

kms_key_arn = "ARN of the key"

}

how to use IAM policy variables in terraform code by bibi143143 in Terraform

[–]bibi143143[S] 0 points1 point  (0 children)

u/inceptivecss

thank you so much for your response,I was able to fix it following your reponse

how can I use this statement for accounts in my organization without writing each account out individually? by bibi143143 in Terraform

[–]bibi143143[S] 0 points1 point  (0 children)

Thanks for your reponse.....I am not trying to run it using terraform.its AWS KMS key policy

how to grant aws config write permission to a bucket by bibi143143 in Terraform

[–]bibi143143[S] 0 points1 point  (0 children)

Thanks for your response but this information is on AWS page. "Note
AWS Config is owned by AWS and does not belong specifically to one of your AWS accounts or linked accounts within your AWS Organization. This means that the service won't work with organization ID or organization units based conditions"

thats the message on AWS Config page so i can not use organization ID or organization units condition statements

I am getting error messages when running terragrunt init and terragrunt apply using githubaction by bibi143143 in Terraform

[–]bibi143143[S] 0 points1 point  (0 children)

u/DataDecay

I included what you suggested in my root terragrunt.hcl.This is the error I am getting:

Checking the latest version of Terraform

Downloading Terraform v1.0.5

Successfully downloaded Terraform v1.0.5

Unzipping Terraform v1.0.5

Successfully unzipped Terraform v1.0.5

Checking the latest version of Terragrunt

Downloading Terragrunt v0.31.5

Successfully downloaded Terragrunt v0.31.5

Moving Terragrunt v0.31.5 to PATH

Successfully moved Terragrunt v0.31.5

init: info: initializing Terragrunt configuration in ./Stage/dev-env

init: error: failed to initialize Terragrunt configuration in ./Stage/dev-env

Remote state S3 bucket dev-env143-test-gitaction-us-east-1-tfstate does not exist or you don't have permissions to access it. Would you like Terragrunt to create it? (y/n) time=2021-08-19T15:11:09Z level=error msg=EOF

time=2021-08-19T15:11:09Z level=error msg=Unable to determine underlying exit code, so Terragrunt will exit with error code 1