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

Fix instance_role_arn option that should not be required #20149

Closed
wants to merge 0 commits into from
Closed

Fix instance_role_arn option that should not be required #20149

wants to merge 0 commits into from

Conversation

evantbyrne
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #20145

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

More Info

This is a fix for #20145. I do not have an intimate knowledge of this codebase, so obviously this needs to be checked carefully. I tested this by reapplying the Terraform configuration in #20145 with this patch and successfully provisioned the App Runner service using terraform apply.

Output:

Evans-MacBook-Pro:apprunner evanbyrne$ terraform apply
╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI configuration:
│  - hashicorp/aws in /Users/evanbyrne/go/bin
│
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
aws_apprunner_auto_scaling_configuration_version.scratch: Refreshing state... [id=arn:aws:apprunner:us-east-1:[REDACTED]:autoscalingconfiguration/scratch/1/[REDACTED]]

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:

  # aws_apprunner_service.scratch will be created
  + resource "aws_apprunner_service" "scratch" {
      + arn                            = (known after apply)
      + auto_scaling_configuration_arn = "arn:aws:apprunner:us-east-1:[REDACTED]:autoscalingconfiguration/scratch/1/[REDACTED]"
      + id                             = (known after apply)
      + service_id                     = (known after apply)
      + service_name                   = "scratch"
      + service_url                    = (known after apply)
      + status                         = (known after apply)
      + tags_all                       = (known after apply)

      + health_check_configuration {
          + healthy_threshold   = (known after apply)
          + interval            = (known after apply)
          + path                = (known after apply)
          + protocol            = (known after apply)
          + timeout             = (known after apply)
          + unhealthy_threshold = (known after apply)
        }

      + instance_configuration {
          + cpu    = "1024"
          + memory = "2048"
        }

      + source_configuration {
          + auto_deployments_enabled = false

          + authentication_configuration {
              + access_role_arn = "arn:aws:iam::[REDACTED]:role/service-role/AppRunnerECRAccessRole"
            }

          + image_repository {
              + image_identifier      = "[REDACTED].dkr.ecr.us-east-1.amazonaws.com/[REDACTED]:latest"
              + image_repository_type = "ECR"

              + image_configuration {
                  + port          = "8080"
                  + start_command = "[REDACTED]"
                }
            }
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

aws_apprunner_service.scratch: Creating...
aws_apprunner_service.scratch: Still creating... [10s elapsed]
aws_apprunner_service.scratch: Still creating... [20s elapsed]
aws_apprunner_service.scratch: Still creating... [30s elapsed]
aws_apprunner_service.scratch: Still creating... [40s elapsed]
aws_apprunner_service.scratch: Still creating... [50s elapsed]
aws_apprunner_service.scratch: Still creating... [1m0s elapsed]
aws_apprunner_service.scratch: Still creating... [1m10s elapsed]
aws_apprunner_service.scratch: Still creating... [1m20s elapsed]
aws_apprunner_service.scratch: Still creating... [1m30s elapsed]
aws_apprunner_service.scratch: Still creating... [1m40s elapsed]
aws_apprunner_service.scratch: Still creating... [1m50s elapsed]
aws_apprunner_service.scratch: Still creating... [2m0s elapsed]
aws_apprunner_service.scratch: Still creating... [2m10s elapsed]
aws_apprunner_service.scratch: Still creating... [2m20s elapsed]
aws_apprunner_service.scratch: Still creating... [2m30s elapsed]
aws_apprunner_service.scratch: Still creating... [2m40s elapsed]
aws_apprunner_service.scratch: Still creating... [2m50s elapsed]
aws_apprunner_service.scratch: Still creating... [3m0s elapsed]
aws_apprunner_service.scratch: Still creating... [3m10s elapsed]
aws_apprunner_service.scratch: Still creating... [3m20s elapsed]
aws_apprunner_service.scratch: Still creating... [3m30s elapsed]
aws_apprunner_service.scratch: Creation complete after 3m31s [id=arn:aws:apprunner:us-east-1:[REDACTED]:service/scratch/[REDACTED]]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

I was also able to destroy the resource via Terraform, and make test seemed to run without issue. I have not run make testacc.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/apprunner Issues and PRs that pertain to the apprunner service. size/XS Managed by automation to categorize the size of a PR. labels Jul 12, 2021
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome @evantbyrne 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@anGie44 anGie44 added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 12, 2021
@gdavison gdavison self-assigned this Jul 15, 2021
@evantbyrne
Copy link
Contributor Author

@gdavison This PR has been stale for a few months. Should it be reassigned?

@zhelding
Copy link
Contributor

Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding.

Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single aws directory to a large number of separate directories in internal/service, each corresponding to a particular AWS service. This separation of code has also allowed for us to simplify the names of underlying functions -- while still avoiding namespace collisions.

We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author.

For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000.

For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide.

@gdavison gdavison closed this Nov 19, 2021
@github-actions github-actions bot removed the service/apprunner Issues and PRs that pertain to the apprunner service. label Nov 19, 2021
@gdavison
Copy link
Contributor

Sorry, @evantbyrne, I had to rebase this and it wouldn't let me force push the local branch to your main branch. I'll go ahead and merge the code.

@github-actions
Copy link

github-actions bot commented Jun 9, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_apprunner_service instance_configuration.instance_role_arn is required
4 participants