diff --git a/terraform/ops-aws-instance-profile/.terraform.lock.hcl b/terraform/ops-aws-instance-profile/.terraform.lock.hcl new file mode 100644 index 00000000..e7d43cd2 --- /dev/null +++ b/terraform/ops-aws-instance-profile/.terraform.lock.hcl @@ -0,0 +1,25 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/aws" { + version = "5.43.0" + constraints = "5.43.0" + hashes = [ + "h1:3w6NCYy+mbc9odXmM7K5Xag2ggtapraacZqJR3WpJKc=", + "zh:07fb2abb9cf4d2042b41b2b2c642d4c4bd2feccbd856cd7040a7d15158fed478", + "zh:1373339e796d8d8473c267c0ecddb701559fce454c2cdd192cf8b0eadf759b48", + "zh:1644b4e0fd2e0b28d465bb5cf08b1f594a623324d176e879e5052f78cd2ea8cb", + "zh:385943b8d4170c5269b8e13e876636b7edc0ad2576edc7eb5d81cd4286a461d8", + "zh:48cf103f4fa866b67b686e8c085ac15264d6f020b6ad4a90f496b7283d31faa6", + "zh:4a4c4b4236542089d1bdb688c248e0b7c941ce42887da87e487bfb15038dcaf9", + "zh:5d84f3e12100bdd62a8c295b56358b82afc130642dca80d104bd868fdc28ed7c", + "zh:68294a601ce588a8838bcf4e136bb5ed8d2b1ee410f8871d88e35ce4861cf33f", + "zh:7ae1af6e9b95bd6c33dd0922216ac2b59f2f5b22fedbeab1db7a80b2f4358919", + "zh:89c718d41b2eeeaefd1acdbd839f1326a8c866bd49752648b0b32d3dd4a38163", + "zh:96e54ccb0f5ddf60465edf5c9f46e64f7d2f392507b851f102723797b4a15d09", + "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", + "zh:b102ce204ebbbf32d68ff47b5224eeb60873bef5b58a7fd7790f6b4020801578", + "zh:cae4cb16d15ac4b15c8de5bc9dddc2032583e12c4f31e23b3a7ef22da60657dc", + "zh:fecbcbd63111c9518de261bcb37482cb06ee149e7298f567d45b2a55674faa75", + ] +} diff --git a/terraform/ops-aws-instance-profile/backend.tf b/terraform/ops-aws-instance-profile/backend.tf new file mode 100644 index 00000000..ea186c98 --- /dev/null +++ b/terraform/ops-aws-instance-profile/backend.tf @@ -0,0 +1,10 @@ +terraform { + backend "remote" { + hostname = "app.terraform.io" + organization = "freecodecamp" + + workspaces { + name = "tfws-ops-aws-instance-profile" + } + } +} diff --git a/terraform/ops-aws-instance-profile/main.tf b/terraform/ops-aws-instance-profile/main.tf new file mode 100644 index 00000000..5262f596 --- /dev/null +++ b/terraform/ops-aws-instance-profile/main.tf @@ -0,0 +1,42 @@ +variable "stack_tags" { + type = map(string) + description = "Tags to apply to all resources in this stack" + default = { + Environment = "ops" + Stack = "common" + } +} + +resource "aws_iam_role" "stg_mw_instance_profile_role" { + name = "fCCSSMInstanceProfileRole" + assume_role_policy = <