terraform-aws-github-runner icon indicating copy to clipboard operation
terraform-aws-github-runner copied to clipboard

Resource Groups are no longer working

Open jake-naughton opened this issue 2 years ago • 3 comments

It looks like after a change went out to update the Environment tag to ghr:environment that the Resource Group was not updated to match this.

When I navigate to the Resource Group in AWS I cannot see any related infrastructure since the tag query it is using is: Environment: prefix

If I update this to: ghr:environment: prefix

It fixes the issue.

jake-naughton avatar Sep 13 '22 07:09 jake-naughton

It should be a simple fix, just need to update the resource-group.json from

{
  "ResourceTypeFilters": ["AWS::AllSupported"],
  "TagFilters": [
    {
      "Key": "Environment",
      "Values": ["${environment}"]
    }
  ]
}

to

{
  "ResourceTypeFilters": ["AWS::AllSupported"],
  "TagFilters": [
    {
      "Key": "ghr:environment",
      "Values": ["${environment}"]
    }
  ]
}

Happy to put up a PR.

jake-naughton avatar Sep 13 '22 08:09 jake-naughton

Good catch, please feel free to create a PR

npalm avatar Sep 14 '22 20:09 npalm

We are not setting a predefined tag to all resources. Which means we cannot create a tag based resource group vai the module. Via the provider you can set a tag to all resources. This means we have to remove the resource group from the module at let it to the user to define a resource group in the deployment.

npalm avatar Sep 16 '22 08:09 npalm

@npalm I have added a PR (#2512) to fix this if you could please review when you get a chance.

jake-naughton avatar Oct 10 '22 22:10 jake-naughton

I have created a PR #2514 to create resource groups for the examples

npalm avatar Oct 11 '22 16:10 npalm