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

Service account import issues #1375

Closed
Tracked by #3780
Frassle opened this issue Nov 27, 2023 · 3 comments · Fixed by pulumi/pulumi-terraform-bridge#1672
Closed
Tracked by #3780

Service account import issues #1375

Frassle opened this issue Nov 27, 2023 · 3 comments · Fixed by pulumi/pulumi-terraform-bridge#1672
Assignees
Labels
area/docs Improvements or additions to documentation kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@Frassle
Copy link
Member

Frassle commented Nov 27, 2023

What happened?

Part user issue from slack, part just my observations.

User was trying to import a service account with: pulumi import gcp:serviceaccount/account:Account default projects/****/serviceAccounts/**@**.iam.gserviceaccount.com but got an error:

gcp:serviceaccount:Account (default):
    error: Preview failed: Resource type 'gcp:serviceaccount/account:Account' not found.

When I went to look at the docs for this I noticed the import docs where a mess, including broken markdown from Terraform docs about import blocks.

Example

pulumi import gcp:serviceaccount/account:Account default projects/****/serviceAccounts/**@**.iam.gserviceaccount.com

Output of pulumi about

N/A

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@Frassle Frassle added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Nov 27, 2023
@iwahbe iwahbe added area/docs Improvements or additions to documentation and removed needs-triage Needs attention from the triage team labels Nov 28, 2023
@iwahbe
Copy link
Member

iwahbe commented Nov 28, 2023

For posterity, the import docs on gcp:serviceaccount:Account look like this:

Screenshot 2023-11-28 at 11 43 08 AM

@guineveresaenger
Copy link
Contributor

guineveresaenger commented Jan 31, 2024

This should be fixed as of pulumi-terraform-bridge v3.72.0, which will go out bundled in this week's gcp release.

pulumi/pulumi-terraform-bridge#1629 addresses this specifically.

Here is a registry preview of the changes

Because registry site previews don't persist, here's a screenshot:

Screenshot 2024-01-31 at 1 22 45 PM

This might be good enough to close this issue although of course it would be a nice refinement to ensure we add some newlines.

@guineveresaenger guineveresaenger self-assigned this Jan 31, 2024
@iwahbe
Copy link
Member

iwahbe commented Feb 1, 2024

Let's take the opportunity to get the newline insertion working. This is taken from http://registry--origin-pr-3880-8a2862d0.s3-website.us-west-2.amazonaws.com/registry/packages/gcp/api-docs/certificatemanager/certificatemap/#gcp-certificatemanager-certificatemap:

Screenshot 2024-02-01 at 11 27 34 AM

There is a pretty big readability improvement going from ☝️ to 👇.

CertificateMap can be imported using any of these accepted formats

  • projects/{{project}}/locations/global/certificateMaps/{{name}}
  • {{project}}/{{name}}
  • {{name}}

When using the pulumi import command, CertificateMap can be imported using one of the formats above. For example

@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Feb 5, 2024
guineveresaenger added a commit to pulumi/pulumi-terraform-bridge that referenced this issue Feb 5, 2024
This PR allows docsgen to retain newlines in import sections by adding a
double newline placeholder to the end of every line in the `Import`
section of the docs.

Previously, newlines were not honored except around the import code part
itself.

Tests are adjusted to reflect newlines being appended rather than
prepended.

[Here is a registry
preview](http://registry--origin-pr-3897-6eedfa57.s3-website.us-west-2.amazonaws.com/registry/packages/gcp/api-docs/certificatemanager/certificatemap/)

Screenshot from that preview:

<img width="768" alt="Screenshot 2024-02-02 at 5 33 14 PM"
src="https://github.com/pulumi/pulumi-terraform-bridge/assets/13116240/80c61703-9f88-424d-bd56-50829a2c46e9">

Closes pulumi/pulumi-gcp#1375.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Improvements or additions to documentation kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants