Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: Add tests for instance and app association#2198

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kylecarbs merged 1 commit intomainfrominstanceassociation
Jun 9, 2022

Conversation

kylecarbs
Copy link
Member

This was regressed in#2187. There was bad testing around this
before, and this should prevent a similar situation from happening
again!

bpmct reacted with laugh emoji
@kylecarbskylecarbs self-assigned thisJun 9, 2022
@kylecarbskylecarbs requested a review fromjohnstcnJune 9, 2022 13:03
@johnstcnjohnstcn requested a review frommafredriJune 9, 2022 13:06
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

I'm not as familiar with this part of the codebase, but this proposed change LGTM!

This was regressed in#2187. There was bad testing around thisbefore, and this should prevent a similiar situation from happeningagain!
@kylecarbskylecarbsenabled auto-merge (squash)June 9, 2022 13:21
@kylecarbskylecarbs merged commitfff59ef intomainJun 9, 2022
@kylecarbskylecarbs deleted the instanceassociation branchJune 9, 2022 13:34
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

LGTM!

"aws_instance": "id",
"azurerm_linux_virtual_machine": "id",
"azurerm_windows_virtual_machine": "id",
}[resource.Type]
Copy link
Member

Choose a reason for hiding this comment

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

So I'm still pretty noobish when it comes to Terraform, but it seems like we're automatically mapping these resource types forall agents. So for instance if there's both agoogle_compute_instance, and anaws_instance, one would overwrite the other?

I'm sure the above wouldn't be a common use case, but I imagine it would be possible to create a semi-complex Terraform template with multiple providers depending on certain selections? And I imagine this would be a use-case for having multiple agents, are there others?

If my questions make no sense, feel free to disregard 😄

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

If my questions make no sense, feel free to disregard 😄

All questions I'm happy to answer!

So for instance if there's both a google_compute_instance, and an aws_instance, one would overwrite the other?

There's a one -> many mapping of resource to agent. If a resource isn't using token authentication, we assume it's using the zero-trust providers we support:*-instance-identity under theauth parameter on an agent. An instance ID can be manually associated with thecoder_agent_instance resource, but we automatically associate it with one of the listed resource types. There isn't an explicit reason we need to do this, and it might end up adding more confusion, so it's not impossible we remove it at some point.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, thanks for clarifying@kylecarbs! I don't think we need to make any changes to it at this point, but good to be aware of it.

kylecarbs added a commit that referenced this pull requestJun 10, 2022
This was regressed in#2187. There was bad testing around thisbefore, and this should prevent a similiar situation from happeningagain!
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mafredrimafredrimafredri approved these changes

@johnstcnjohnstcnjohnstcn approved these changes

@deansheatherdeansheatherAwaiting requested review from deansheather

Assignees

@kylecarbskylecarbs

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@kylecarbs@mafredri@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp