Class: TerraformConfig::AuditContext

Inherits:
Base
  • Object
show all
Defined in:
lib/core/terraform_config/audit_context.rb

Constant Summary

Constants included from Dsl

Dsl::EXPRESSION_PATTERN

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#locals

Methods included from Dsl

#argument, #block

Constructor Details

#initialize(name:, description: nil, tags: nil) ⇒ AuditContext

Returns a new instance of AuditContext.



7
8
9
10
11
12
13
# File 'lib/core/terraform_config/audit_context.rb', line 7

def initialize(name:, description: nil, tags: nil)
  super()

  @name = name
  @description = description
  @tags = tags
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



5
6
7
# File 'lib/core/terraform_config/audit_context.rb', line 5

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/core/terraform_config/audit_context.rb', line 5

def name
  @name
end

#tagsObject (readonly)

Returns the value of attribute tags.



5
6
7
# File 'lib/core/terraform_config/audit_context.rb', line 5

def tags
  @tags
end

Instance Method Details

#importable?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/core/terraform_config/audit_context.rb', line 15

def importable?
  true
end

#referenceObject



19
20
21
# File 'lib/core/terraform_config/audit_context.rb', line 19

def reference
  "cpln_audit_context.#{name}"
end

#to_tfObject



23
24
25
26
27
28
29
# File 'lib/core/terraform_config/audit_context.rb', line 23

def to_tf
  block :resource, :cpln_audit_context, name do
    argument :name, name
    argument :description, description, optional: true
    argument :tags, tags, optional: true
  end
end