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

Adding amp workspace datasource #26120

Merged
merged 13 commits into from
Aug 8, 2022
Merged

Adding amp workspace datasource #26120

merged 13 commits into from
Aug 8, 2022

Conversation

lewinkedrs
Copy link
Contributor

@lewinkedrs lewinkedrs commented Aug 3, 2022

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 #24503.

Output from Datasource (values sanitized):

Outputs:

fetched_info_from_aws = {
  "alias" = "west-workspace"
  "arn" = "arn:aws:amp:us-west-2:875375:/workspaces/ws-334a1-2c67-4a1a-94381-9b83d3d73ef7"
  "created_date" = "2022-06-10T18:10:39Z"
  "id" = "ws-31dd8a1-2c67-4a1a-9581-9b83d3d73ef7"
  "prometheus_endpoint" = "https://aps-workspaces.us-west-2.amazonaws.com/workspaces/ws-3da1-2c67-4a1a-9581-9654d3d73ef7/"
  "status" = "ACTIVE"
  "tags" = tomap({
    "terra" = "init"
  })
  "workspace_id" = "ws-31468a1-2c67-4121a-9581-9b83d3d73ef7"
}

Output from acceptance testing:

✗ make testacc PKG=amp
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/amp/... -v -count 1 -parallel 20 -timeout 180m
=== RUN TestAccAMPAlertManagerDefinition_basic
=== PAUSE TestAccAMPAlertManagerDefinition_basic
=== RUN TestAccAMPAlertManagerDefinition_disappears
=== PAUSE TestAccAMPAlertManagerDefinition_disappears
=== RUN TestAccAMPRuleGroupNamespace_basic
=== PAUSE TestAccAMPRuleGroupNamespace_basic
=== RUN TestAccAMPRuleGroupNamespace_disappears
=== PAUSE TestAccAMPRuleGroupNamespace_disappears
=== RUN TestAccAMPWorkspace_basic
=== PAUSE TestAccAMPWorkspace_basic
=== RUN TestAccAMPWorkspace_disappears
=== PAUSE TestAccAMPWorkspace_disappears
=== RUN TestAccAMPWorkspace_tags
=== PAUSE TestAccAMPWorkspace_tags
=== CONT TestAccAMPAlertManagerDefinition_basic
=== CONT TestAccAMPWorkspace_basic
=== CONT TestAccAMPWorkspace_disappears
=== CONT TestAccAMPWorkspace_tags
=== CONT TestAccAMPRuleGroupNamespace_disappears
=== CONT TestAccAMPAlertManagerDefinition_disappears
=== CONT TestAccAMPRuleGroupNamespace_basic
--- PASS: TestAccAMPWorkspace_disappears (19.60s)

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/amp Issues and PRs that pertain to the amp service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/L Managed by automation to categorize the size of a PR. labels Aug 3, 2022
@lewinkedrs lewinkedrs changed the title adding amp datasource Adding amp workspace datasource Aug 3, 2022
@jeromeinsf
Copy link

@nicolai86 thoughts?

.changelog/26120.txt Outdated Show resolved Hide resolved
website/docs/d/amp_workspace.html.markdown Outdated Show resolved Hide resolved
@lewinkedrs lewinkedrs requested review from nicolai86 and removed request for jeromeinsf August 4, 2022 15:28
@nicolai86
Copy link
Contributor

let's make sure to carry the right provider name forward in the data source file name as well. d/amp_workspace.html.markdown -> d/prometheus_workspace.html.markdown. This way it matches the resource file name as well.

@lewinkedrs lewinkedrs removed the request for review from nicolai86 August 5, 2022 14:20
@ewbankkit ewbankkit added new-data-source Introduces a new data source. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 8, 2022
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccAMPWorkspaceDataSource_' PKG=amp ACCTEST_PARALLELISM=1
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/amp/... -v -count 1 -parallel 1  -run=TestAccAMPWorkspaceDataSource_ -timeout 180m
=== RUN   TestAccAMPWorkspaceDataSource_basic
--- PASS: TestAccAMPWorkspaceDataSource_basic (19.07s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/amp	24.085s

@ewbankkit
Copy link
Contributor

@lewinkedrs Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 79a4d33 into hashicorp:main Aug 8, 2022
@github-actions github-actions bot added this to the v4.26.0 milestone Aug 8, 2022
@github-actions
Copy link

This functionality has been released in v4.26.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!

@github-actions
Copy link

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 Sep 12, 2022
@justinretzolk justinretzolk added the partner Contribution from a partner. label May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. new-data-source Introduces a new data source. partner Contribution from a partner. provider Pertains to the provider itself, rather than any interaction with AWS. service/amp Issues and PRs that pertain to the amp service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_prometheus_workspace data source
5 participants