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

[Bug]: aws_ssoadmin_application fails due to missing app url #34836

Closed
jorhett opened this issue Dec 9, 2023 · 4 comments · Fixed by #34967
Closed

[Bug]: aws_ssoadmin_application fails due to missing app url #34836

jorhett opened this issue Dec 9, 2023 · 4 comments · Fixed by #34967
Assignees
Labels
bug Addresses a defect in current functionality. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/ssoadmin Issues and PRs that pertain to the ssoadmin service.
Milestone

Comments

@jorhett
Copy link

jorhett commented Dec 9, 2023

Terraform Core Version

1.6.5

AWS Provider Version

5.30.0

Affected Resource(s)

Expected Behavior

ssoadmin_application sign_in_options application_url documentation indicates that it is an optional field.

Further than creating an app in the console creates apps without this field.

Actual Behavior

Creating a new app:

Error: creating AWS SSO Admin Application ("okta-eng-data-eng"):
  operation error SSO Admin: CreateApplication,
  https response error StatusCode: 400, RequestID: a549a6bf-4c2b-4a14-960c-7eb7e7533ba3,
  ValidationException:

Updating an existing app that currently doesn't have this value (pulled in via terraform import)

Error: updating AWS SSO Admin Application ("arn:aws:sso::550004441135:application/ssoins-79076c6b2a72f513/apl-525941a0058df9b1"):
 operation error SSO Admin: UpdateApplication,
 https response error StatusCode: 400, RequestID: 952ce6e7-2bd4-4d80-b5ac-a3519401abad, 
 ValidationException:

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_ssoadmin_application" "example" {
  name                     = "example"
  description              = "example"
  application_provider_arn = "arn:aws:sso::aws:applicationProvider/catalog/ExternalAWSAccount"
  instance_arn             = tolist(data.aws_ssoadmin_instances.example.arns)[0]

  portal_options {
    visibility = "ENABLED"
    sign_in_options {
      origin = "IDENTITY_CENTER"
    }
  }
}

Steps to Reproduce

Try to create the resource above.

Debug Output

2023-12-08T15:47:52.447-0800 [DEBUG] provider.terraform-provider-aws_v5.30.0_x5: HTTP Response Received: http.response_content_length=398 rpc.system=aws-api tf_req_id=d2332965-886c-95b2-e795-7152279fbb7e http.duration=194 http.status_code=400 tf_aws.sdk=aws-sdk-go-v2 tf_provider_addr=registry.terraform.io/hashicorp/aws tf_resource_type=aws_ssoadmin_application tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/aws-sdk-go-base/[email protected]/logging/tf_logger.go:45 aws.region=us-west-2 http.response.header.content_type=application/x-amz-json-1.1 http.response.header.x_amzn_requestid=952ce6e7-2bd4-4d80-b5ac-a3519401abad rpc.method=UpdateApplication rpc.service="SSO Admin" @module=aws
  http.response.body=
  | {"__type":"ValidationException","message":"Value of input 'portalOptions.signInOptions.applicationUrl' failed to satisfy constraint: Member must satisfy regular expression pattern: http(s)?:\\/\\/[-a-zA-Z0-9+&@#\\/%?=~_|!:,.;]*[-a-zA-Z0-9+&bb@#\\/%?=~_|]; Value of input 'portalOptions.signInOptions.applicationUrl' failed to satisfy constraint: Member must have length greater than or equal to 1"}
   http.response.header.date="Fri, 08 Dec 2023 23:47:52 GMT" tf_aws.signing_region="" tf_mux_provider="*proto5server.Server" timestamp=2023-12-08T15:47:52.443-0800

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@jorhett jorhett added the bug Addresses a defect in current functionality. label Dec 9, 2023
Copy link

github-actions bot commented Dec 9, 2023

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/ssoadmin Issues and PRs that pertain to the ssoadmin service. label Dec 9, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 9, 2023
@jorhett
Copy link
Author

jorhett commented Dec 9, 2023

Of note, from the AWS CLI documentation https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sso-admin/create-application.html

ApplicationUrl -> (string)
The URL that accepts authentication requests for an application. This is a required parameter if the Origin parameter is APPLICATION.

So this definitely should not trip when the origin is IDENTITY_CENTER

Looking at the debug I see that it is submitting an empty value, perhaps it should not submit this field at all?

http.request.body=
  | {"ApplicationArn":"arn:aws:sso::0123456789012:application/ssoins-19016c6b2a12f513/apl-323941a0038df9b1",
     "Description":"example","Name":"example",
     "PortalOptions":{"SignInOptions":{"ApplicationUrl":"","Origin":"IDENTITY_CENTER"}},
     "Status":"ENABLED"}

@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Dec 12, 2023
@jar-b jar-b self-assigned this Dec 18, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Dec 18, 2023
@github-actions github-actions bot added this to the v5.32.0 milestone Dec 19, 2023
@github-actions github-actions bot removed the bug Addresses a defect in current functionality. label Jan 12, 2024
Copy link

This functionality has been released in v5.32.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Feb 10, 2024
Copy link

I'm going to lock this issue 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 similar to this, 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 Mar 12, 2024
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. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/ssoadmin Issues and PRs that pertain to the ssoadmin service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants