-
Notifications
You must be signed in to change notification settings - Fork 1
fix: corrige permissões IAM para bucket de state do Terraform #38
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
maxsonferovante
commented
Nov 30, 2025
- Corrige nome do bucket de state nas permissões S3 (de 'tf-state' para 'state')
- Resolve problema onde recursos eram criados mas state não era salvo
- Corrige nome do bucket de state nas permissões S3 (de 'tf-state' para 'state') - Parametriza nomes dos buckets usando variáveis do projeto - Resolve problema onde recursos eram criados mas state não era salvo
Terraform Plan (shared)Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# aws_iam_policy.github_actions_policy will be updated in-place
~ resource "aws_iam_policy" "github_actions_policy" {
id = "arn:aws:iam::334318883918:policy/github-actions-policy"
name = "github-actions-policy"
~ policy = jsonencode(
~ {
~ Statement = [
{
Action = [
"iam:UntagRole",
"iam:TagRole",
"iam:PutRolePolicy",
"iam:ListRolePolicies",
"iam:ListAttachedRolePolicies",
"iam:GetRole",
"iam:GetPolicyVersion",
"iam:GetPolicy",
"iam:GetOpenIDConnectProvider",
"iam:DetachRolePolicy",
"iam:DeleteRolePolicy",
"iam:DeleteRole",
"iam:CreateRole",
"iam:AttachRolePolicy",
]
Effect = "Allow"
Resource = "*"
},
~ {
~ Resource = [
# (1 unchanged element hidden)
"arn:aws:s3:::tech-floripa-plan-artifacts",
~ "arn:aws:s3:::tech-floripa-certificates-dev-tf-state/*" -> "arn:aws:s3:::tech-floripa-certificates-dev-state/*",
~ "arn:aws:s3:::tech-floripa-certificates-dev-tf-state" -> "arn:aws:s3:::tech-floripa-certificates-dev-state",
"arn:aws:s3:::tech-floripa-certificates-dev-bucket/*",
# (1 unchanged element hidden)
]
# (2 unchanged attributes hidden)
},
{
Action = [
"ecr:UntagResource",
"ecr:TagResource",
"ecr:PutLifecyclePolicy",
"ecr:PutImageTagMutability",
"ecr:PutImageScanningConfiguration",
"ecr:ListTagsForResource",
"ecr:GetLifecyclePolicy",
"ecr:DeleteRepository",
"ecr:DeleteLifecyclePolicy",
"ecr:CreateRepository",
]
Effect = "Allow"
Resource = [
"arn:aws:ecr:us-east-1:334318883918:repository/tech-floripa-certificates-notification-dev",
"arn:aws:ecr:us-east-1:334318883918:repository/tech-floripa-certificates-builder-dev",
"arn:aws:ecr:us-east-1:334318883918:repository/tech-floripa-certificates-api-dev",
]
},
# (10 unchanged elements hidden)
]
# (1 unchanged attribute hidden)
}
)
tags = {}
# (7 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy. |
Terraform Plan (dev)Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# module.s3.aws_s3_bucket.certificates_bucket will be created
+ resource "aws_s3_bucket" "certificates_bucket" {
+ acceleration_status = (known after apply)
+ acl = (known after apply)
+ arn = (known after apply)
+ bucket = "tech-floripa-certificates-dev-bucket"
+ bucket_domain_name = (known after apply)
+ bucket_prefix = (known after apply)
+ bucket_region = (known after apply)
+ bucket_regional_domain_name = (known after apply)
+ force_destroy = true
+ hosted_zone_id = (known after apply)
+ id = (known after apply)
+ object_lock_enabled = (known after apply)
+ policy = (known after apply)
+ region = "us-east-1"
+ request_payer = (known after apply)
+ tags = {
+ "Environment" = "dev"
+ "Name" = "tech-floripa-certificates-dev-bucket"
+ "Project" = "tech-floripa-certificates"
+ "Region" = "us-east-1"
}
+ tags_all = {
+ "Environment" = "dev"
+ "ManagedBy" = "terraform"
+ "Name" = "tech-floripa-certificates-dev-bucket"
+ "Project" = "tech-floripa-certificates"
+ "Region" = "us-east-1"
}
+ website_domain = (known after apply)
+ website_endpoint = (known after apply)
+ cors_rule (known after apply)
+ grant (known after apply)
+ lifecycle_rule (known after apply)
+ logging (known after apply)
+ object_lock_configuration (known after apply)
+ replication_configuration (known after apply)
+ server_side_encryption_configuration (known after apply)
+ versioning (known after apply)
+ website (known after apply)
}
# module.s3.aws_s3_bucket_lifecycle_configuration.certificates_bucket_lifecycle_config[0] will be created
+ resource "aws_s3_bucket_lifecycle_configuration" "certificates_bucket_lifecycle_config" {
+ bucket = (known after apply)
+ expected_bucket_owner = (known after apply)
+ id = (known after apply)
+ region = "us-east-1"
+ transition_default_minimum_object_size = "all_storage_classes_128K"
+ rule {
+ id = "lifecycle-rule"
+ status = "Enabled"
# (1 unchanged attribute hidden)
+ expiration {
+ days = 90
+ expired_object_delete_marker = false
}
+ filter {
+ prefix = "certificates/"
}
}
}
Plan: 2 to add, 0 to change, 0 to destroy.
Changes to Outputs:
+ s3_bucket_arn = (known after apply)
+ s3_bucket_name = (known after apply) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.