Skip to content

Commit

Permalink
Merge pull request #4 from filatov0120/add-user_data
Browse files Browse the repository at this point in the history
add user_data variable
  • Loading branch information
filatov0120 authored Jun 26, 2023
2 parents eaf517c + 52da180 commit 33d80cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aws_instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ resource "aws_instance" "this" {
vpc_security_group_ids = [aws_security_group.this.id]
subnet_id = var.subnet_id
key_name = var.ssh_key
user_data = var.user_data

lifecycle {
ignore_changes = [user_data]
}

root_block_device {
volume_size = var.root_block_size
Expand Down
4 changes: 4 additions & 0 deletions aws_instance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ variable "project_name" {
default = ""
}

variable "user_data" {
description = "User data for instance"
}

variable "instance_tags" {
description = "Common tags to apply resourses"
type = map(any)
Expand Down

0 comments on commit 33d80cb

Please sign in to comment.